-
Notifications
You must be signed in to change notification settings - Fork 562
Convert gc_e2e_test.go to ginkgo #1429
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
Convert gc_e2e_test.go to ginkgo #1429
Conversation
test/e2e/gc_e2e_test.go
Outdated
|
||
//By("check for dependent (should be deleted since last blocking owner was deleted", func() { | ||
// check for dependent (should be deleted since last blocking owner was deleted) | ||
cf, err := kubeClient.KubernetesInterface().CoreV1().ConfigMaps(testNamespace).Get(dependent.GetName(), metav1.GetOptions{}) |
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.
The test ensures that the dependent configMap
is not deleted if one of its owner reference is deleted.
Problem: The assertion at line 266 fails because err
is nil
What I found:
When ownerB CSV is deleted, an empty configMap
struct is returned in the older version. (line 262)
See below output:
Current version:
###B &ConfigMap{ObjectMeta:{dependent openshift-operators /api/v1/namespaces/openshift-operators/configmaps/dependent 412d8073-d3ce-4d11-9a77-7876f0e8e062 161740 0 2020-04-06 18:25:30 -0400 EDT <nil> <nil> map[] map[] [
Older version:
###B &ConfigMap{ObjectMeta:{ 0 0001-01-01 00:00:00 +0000 UTC <nil> <nil> map[] map[] [] [] []},Data:map[string]string{},BinaryData:map[string][]byte{},}cleaning up any remaining non persistent resources...
The cf
returned here has value whereas in the older version of the file, cf
returns an empty ConfigMap struct as seen above
Because of this, at line 266
Current version:
Error is <nil> and value is <nil>
vs
Older version:
Error type *errors.StatusError and value is configmaps "dependent" not found
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 wonder if that has anything to do with your foreground deletion option. Since the object in the configmap returned is the dependent.
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.
Figured out the issue. It was related to the placement of the deletion code inside of It
block. Thanks for looking into this!
fbee673
to
182efde
Compare
test/e2e/gc_e2e_test.go
Outdated
|
||
When("removing one of the owner", func() { | ||
|
||
It("deleting ownerA CSV in the foreground", func() { |
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.
nit:
It("deleting ownerA CSV in the foreground", func() { | |
It("deletes ownerA CSV in the foreground", func() { |
test/e2e/gc_e2e_test.go
Outdated
Expect(err).NotTo(HaveOccurred(), "dependent could not be created") | ||
}) | ||
|
||
Context("owner reference behavior can be verified", func() { |
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.
shouldn't this describe the context more? something about the foreground propogation policy?
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 have added it :)
test/e2e/gc_e2e_test.go
Outdated
// CSV-A CSV-B CSV-B | ||
// \ / --Delete CSV-A--> | | ||
// ConfigMap ConfigMap | ||
Describe("Multiple OwnerReferences will not be garbage collected", func() { |
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.
Describe("Multiple OwnerReferences will not be garbage collected", func() { | |
Describe("Resources with Multiple OwnerReferences", func() { |
/retest |
17aa209
to
1afae36
Compare
/retest |
/retest |
2 similar comments
/retest |
/retest |
/lgtm |
/retest |
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.
No blocking nits - feel free to update the PR as you see fit.
/approve |
Adding a valid bug because making CI tests more reliable. |
/test e2e-gcp |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
/hold I am worried that we are adding flakes to CI the test failures appear to be related to this change can someone look? |
@shawn-hurley, I ran some analysis(with Ben's help) on our ci-failures using prow's history. Could you take a look at this gist and see if it has enough evidence to have this and other ginkgo PRs merged? |
/hold cancel |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
15 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
Description of the change:
This change converts gc_e2e_test.go to leverage ginkgo's BDD approach
Motivation for the change:
Reviewer Checklist
/docs