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
NO-JIRA: add simple test for server side apply to demonstrate field clearing #28491
Conversation
g.Fail("missing SecondType condition") | ||
} | ||
if containsCondition(currInstance.Status.Conditions, "FirstType") { | ||
g.Fail("has FirstType condition unexectedly") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
notice this line doesn't execute because the condition is not present.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ErrUnexpectedTypo
g.Fail("has FirstType condition unexectedly") | |
g.Fail("has FirstType condition unexpectedly") |
g.It("should clear fields when they are no longer being applied", func() { | ||
ctx := context.Background() | ||
|
||
// TODO use another API. I might have a version in my cache somewhere using a pod. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a type where the conditions have listType
and listMapKey
annotations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a type where the conditions have
listType
andlistMapKey
annotations.
Updated to have tests with
- clusteroperator
- featuregate
- pods
behavior is consistent. This could be cleaned up in to a decent e2e test if it's valuable.
Job Failure Risk Analysis for sha: 9894c3e
|
g.Fail("missing SecondType condition") | ||
} | ||
if containsCondition(currInstance.Status.Conditions, "FirstType") { | ||
g.Fail("has FirstType condition unexectedly") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ErrUnexpectedTypo
g.Fail("has FirstType condition unexectedly") | |
g.Fail("has FirstType condition unexpectedly") |
g.It("should clear fields when they are no longer being applied in pods", func() { | ||
ctx := context.Background() | ||
|
||
// TODO use another API. I might have a version in my cache somewhere using a pod. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still relevant?
g.Fail("missing SecondType condition") | ||
} | ||
if containsMetaCondition(currInstance.Status.Conditions, "FirstType") { | ||
g.Fail("has FirstType condition unexectedly") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
g.Fail("has FirstType condition unexectedly") | |
g.Fail("has FirstType condition unexpectedly") |
g.Fail("missing SecondType condition") | ||
} | ||
if containsPodCondition(currInstance.Status.Conditions, "FirstType") { | ||
g.Fail("has FirstType condition unexectedly") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
g.Fail("has FirstType condition unexectedly") | |
g.Fail("has FirstType condition unexpectedly") |
bc9df51
to
874047a
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, JoelSpeed 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 |
@deads2k: The following tests failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
Job Failure Risk Analysis for sha: 1eb5134
|
@deads2k: This pull request explicitly references no jira issue. In response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
49de0ae
into
openshift:master
/assign @stevekuznetsov
fields clear when not set.