-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Distinguish projected secret, configmap and downward api tests #68910
Conversation
Ok, the diff looks ridiculous, but all I did was add 3 Context() blocks! |
/assign @BenTheElder |
test/e2e/common/projected.go: "should be consumable from pods in volume" | ||
test/e2e/common/projected.go: "should be consumable from pods in volume with defaultMode set" | ||
test/e2e/common/projected.go: "should be consumable from pods in volume as non-root" | ||
test/e2e/common/projected.go: "should be consumable from pods in volume with mappings" | ||
test/e2e/common/projected.go: "should be consumable from pods in volume with mappings and Item mode set" | ||
test/e2e/common/projected.go: "should be consumable from pods in volume with mappings as non-root" | ||
test/e2e/common/projected.go: "updates should be reflected in volume" | ||
test/e2e/common/projected.go: "optional updates should be reflected in volume" | ||
test/e2e/common/projected.go: "configMap with updates should be reflected in volume" |
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.
oops
Thank you! cc @spiffxp |
@@ -112,15 +112,15 @@ test/e2e/common/projected.go: "should be consumable from pods in volume as non-r | |||
test/e2e/common/projected.go: "should be consumable from pods in volume with mappings" | |||
test/e2e/common/projected.go: "should be consumable from pods in volume with mappings and Item Mode set" | |||
test/e2e/common/projected.go: "should be consumable in multiple volumes in a pod" | |||
test/e2e/common/projected.go: "optional updates should be reflected in volume" | |||
test/e2e/common/projected.go: "updates should be reflected in volume" | |||
test/e2e/common/projected.go: "should be consumable from pods in volume" | |||
test/e2e/common/projected.go: "should be consumable from pods in volume with defaultMode set" | |||
test/e2e/common/projected.go: "should be consumable from pods in volume as non-root" | |||
test/e2e/common/projected.go: "should be consumable from pods in volume with mappings" |
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.
this one is still duplicated AFAICT (see line 112 currently)
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 made the full test case name unique, by adding in another Context(). However, the string inside the It() is still duplicated.
Do we need the It() strings to be unique?
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 other option I could do is to split out the tests into 3 different files: projected_secret, projected_configmap, projected_downwardapi
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 full identifier needs to be unique, as long as that's the case. I think you're right and that this will already work but it might be worth splitting up anyhow?
@@ -112,15 +112,15 @@ test/e2e/common/projected.go: "should be consumable from pods in volume as non-r | |||
test/e2e/common/projected.go: "should be consumable from pods in volume with mappings" | |||
test/e2e/common/projected.go: "should be consumable from pods in volume with mappings and Item Mode set" | |||
test/e2e/common/projected.go: "should be consumable in multiple volumes in a pod" | |||
test/e2e/common/projected.go: "optional updates should be reflected in volume" | |||
test/e2e/common/projected.go: "updates should be reflected in volume" | |||
test/e2e/common/projected.go: "should be consumable from pods in volume" | |||
test/e2e/common/projected.go: "should be consumable from pods in volume with defaultMode set" |
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.
this one as well (see line 110 currently)
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.
Ok after splitting them into separate files, I am still seeing some duplicates. So far it looks like at least one of the duplicate tests is a superset of the other. Can I remove conformance tests?
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'm not sure what the rules for removing conformance tests are, They're expected to not change post-release but I'm not sure about during a release.
@spiffxp might be able to comment on this.
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.
er and yeah splitting the files wouldn't be enough I think, they'd need split-file-matching contexts I think? the generated [sig-storage] Projected should be consumable from pods in volume with mappings [NodeConformance] [Conformance]
entry needs to be unique
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 changed the top level Describe() of each new file to be unique
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.
maybe we need to update the walker that generates this list, it strips out a lot
Testname: Projected Volume, ConfigMap, update | ||
Description: A Pod is created with projected volume source ‘ConfigMap’ to store a configMap and performs a create and update to new value. Pod MUST be able to create the configMap with value-1. Pod MUST be able to update the value in the confgiMap to value-2. | ||
*/ | ||
framework.ConformanceIt("updates should be reflected in volume [NodeConformance]", 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.
This test is a subset of the next test. I think we can remove 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.
@spiffxp is it ok if I remove this test from the conformance suite (and all suites in general)?
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.
yes
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.
So optional and non optional projected volumes have exactly the same behavior?
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.
Ah I didn't realize there was actually an Optional
field in the API. I will add the test back. Maybe we should add one more test case to test pod failure when optional == false
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.
One more observation: non-optional is not tested for secrets either. So some future areas to improve coverage:
- non-optional for secrets
- non-optional should fail for secrets when key doesn't exist
- non-optional should fail for configmaps when key doesn't exist
47775da
to
e4ed54f
Compare
/area conformance |
/kind cleanup |
/retest |
Updated and squashed:
|
Thanks so much for looking at this! Fixing this will make it viable to get ~correct results faster by running the conformance suite first in parallel for non- |
this is ready for review. PTAL @spiffxp |
/milestone v1.13 |
/test pull-kubernetes-integration |
Put the non-optional update configmap test case back. So this PR is strictly:
|
/test pull-kubernetes-integration |
/retest |
/retest |
2 similar comments
/retest |
/retest |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: msau42, smarterclayton 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 |
ping @spiffxp for review again |
/lgtm |
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #68904
Special notes for your reviewer:
Release note: