-
Notifications
You must be signed in to change notification settings - Fork 545
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
fix disable copied csv e2e test failure #2543
fix disable copied csv e2e test failure #2543
Conversation
Hi @akihikokuroda. Thanks for your PR. I'm waiting for a operator-framework member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
The unit test failure is addressed in #2522 |
28904dd
to
5df4ea7
Compare
/ok-to-test |
9a7cdde
to
d05dd7f
Compare
test/e2e/csv_e2e_test.go
Outdated
ns = &corev1.Namespace{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: genName("csv-toggle-test-"), | ||
}, | ||
} | ||
|
||
if err := ctx.Ctx().Client().Create(context.TODO(), &operatorGroup); err != nil && !k8serrors.IsAlreadyExists(err) { | ||
ctx.Ctx().Logf("Unable to create og: %v", err) | ||
return err | ||
} | ||
operatorGroup = operatorsv1.OperatorGroup{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: genName("csv-toggle-test-"), | ||
Namespace: ns.GetName(), | ||
}, | ||
} |
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.
Can we use the SetupGeneratedTestNamespace
helper function instead, which is a way to generate a test namespace + an OperatorGroup resource? That allows us to also use the TeardownNamespace
helper function to also collect test artifacts when an individual test case fails.
For a concrete example of this pattern: https://github.com/operator-framework/operator-lifecycle-manager/blob/master/test/e2e/subscription_e2e_test.go#L58.
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.
Thanks! I'll take a look.
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.
I had to tweak SetupGeneratedTestNamespace function a little bit for this test.
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.
Any reason you had to change around that helper function? It's not immediately clear to me when looking at these changes again, as the output of the previous and current implementation(s) all appear to have the same output:
- A namespace is created
- An OperatorGroup that targets the generated namespace is created
Am I missing something?
d05dd7f
to
341bf4f
Compare
341bf4f
to
cfff0fe
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: akihikokuroda, awgreene 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 |
@akihikokuroda It looks like you need to rebase against master to make branch protection rules happy. |
cfff0fe
to
e93c2d1
Compare
/lgtm |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
e93c2d1
to
856f14c
Compare
@akihikokuroda Apologies - can you rebase this PR once more 😆 - we should prioritize this merging before any other PRs at this point. |
Signed-off-by: akihikokuroda <akihikokuroda2020@gmail.com>
856f14c
to
c6ad83c
Compare
/lgtm |
Signed-off-by: akihikokuroda akihikokuroda2020@gmail.com
Description of the change:
The all tests in
Describe("Disabling copied CSVs"
need a namespace, operatorgroup and csv but they are setup only for the first test. These are not cleaned up after the test so the following tests success when the tests are executed from top to bottom. This PR adds the setup and clean up for all tests in "Disabling copied CSVs".Motivation for the change:
Closes #2542
Reviewer Checklist
/doc