Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a test for custom object operations #930

Closed
wants to merge 2 commits into from

Conversation

roycaihw
Copy link
Member

pick the test from #886 to prevent breaking change like #866 from happening

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 13, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: roycaihw

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 13, 2019
plural='foos',
namespace='default',
name=name,
body={})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you want to check the resp? does it succeed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added .metadata.name check to make sure that the response is a CRD, not a metav1.Status

also added a commit to make the CRD deserializer usable before we fix the upstream openapi spec: kubernetes/kubernetes#64996

@@ -101,8 +101,6 @@ def conditions(self, conditions):
:param conditions: The conditions of this V1beta1CustomResourceDefinitionStatus.
:type: list[V1beta1CustomResourceDefinitionCondition]
"""
if conditions is None:
raise ValueError("Invalid value for `conditions`, must not be `None`")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is generated, and will be overwritten in next release, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, the proper fix will come in 1.16 kubernetes/kubernetes#64996

somehow in the test, the response is deserialized into a dict instead of a CRD object, which causes the attribute assertion to fail. Perhaps this workaround isn't ideal either. I will abandon this pull and verify the CR patch methods manually in the next couple of releases

/close

@k8s-ci-robot
Copy link
Contributor

@roycaihw: Closed this PR.

In response to this:

yes, the proper fix will come in 1.16 kubernetes/kubernetes#64996

somehow in the test, the response is deserialized into a dict instead of a CRD object, which causes the attribute assertion to fail. Perhaps this workaround isn't ideal either. I will abandon this pull and verify the CR patch methods manually in the next couple of releases

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants