-
Notifications
You must be signed in to change notification settings - Fork 562
Modify dynamic_resource_e2e_test to ginkgo #1424
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
Modify dynamic_resource_e2e_test to ginkgo #1424
Conversation
} | ||
} | ||
//Expect(expectedSteps).To(BeZero(), "Resource steps do not match expected: %#v", expectedSteps) | ||
require.Lenf(GinkgoT(), expectedSteps, 0, "Resource steps do not match expected: %#v", expectedSteps) |
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.
Forgot to change: This line needs to be replaced with the commented line above
This is on the right track @harishsurf, but we need to work on the test nodes a bit more before merging. This is what it looks like currently:
Some of this is subjective, but in my opinion the nodes we define have two goals:
in the future we may re-use the catalog context by adding more sub-contexts or |
be8d5b1
to
ab7a649
Compare
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.
Great work. Some nits.
|
||
deleteOpts = &metav1.DeleteOptions{} | ||
// Delete Namespace | ||
err := c.KubernetesInterface().CoreV1().Namespaces().Delete(ns.GetName(), deleteOpts) |
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.
IIRC, there are efforts to clean the namespace before deleting it. I wonder if you want to add them here before deleting the ns. I understand the current work would delete all resources that are in the ns, but may cause deletion to hang if some resources decide to stick around.
On the worst case, I wonder if adding delediate deletion/gracePeriod=0 would help.
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.
@Bowenislandsong , what resources should be cleaned up before deleting a namespace? I was under the impression that cleaner.NotifyTestComplete(true)
which internally calls cleanupOLM
deletes OLM CR's.
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.
ahh. I see. Then this is good. Thanks for the explanation!
Expect(err).NotTo(HaveOccurred()) | ||
|
||
// Wait for the CatalogSource to be ready | ||
catsrc, err = fetchCatalogSource(crc, catsrc.GetName(), catsrc.GetNamespace(), catalogSourceRegistryPodSynced) |
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.
You can change the fetchCatalogSource
function name if you feel need to explain what it does.
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.
fetchCatalogSourceOnReady
or fetchCatalogSourceWhenAvailable
would be a better name?
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.
fetchCatalogSourceOnStatus
? Since you define the status of it to wait on.
|
||
AfterEach(func() { | ||
|
||
deleteOpts = &metav1.DeleteOptions{} |
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.
either make this global or declare it every time you use it.
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.
Ginkgo randomize executions. This deleteOpts may miss its ordering.
/retest |
484f7cf
to
8006cb0
Compare
/retest |
91cfe93
to
a646d19
Compare
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.
/lgtm
/retest |
@harishsurf: No Bugzilla bug is referenced in the title of this pull request. 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 kubernetes/test-infra repository. |
/retest Please review the full test history for this PR and help us cut down flakes. |
c023c02
to
75ad6a1
Compare
/retest |
/retest |
/test e2e-aws-olm |
71bf25e
to
70a4818
Compare
/test e2e-aws-olm |
/retest |
/test e2e-aws-olm |
/test e2e-aws-console-olm |
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.
/approve
A few non-blocking nits.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: awgreene, benluddy, harishsurf 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 |
/lgtm |
Overriding valid bug because this is fixing tests |
Description of the change:
This change adds more structure to the tests by leveraging ginkgo's container/It blocks. The changes also cleans up some of the functions in util_test.go. I have posted some questions in the Files changed section for which I need some inputs. Thanks!
Motivation for the change:
Reviewer Checklist
/docs