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
Bug 1992596: e2e/cli: More basicresources.sh #26502
Conversation
@deejross: This pull request references Bugzilla bug 1992596, which is valid. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
Requesting review from QA contact: 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. |
/assign @soltysh |
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 merging this as is to unblock oc tests, but I expect the bits mentioned here to be fixed in a followup.
/lgtm
/approve
@@ -244,6 +244,7 @@ func pulledInvalidImages(fromRepository string) ginkgo.JUnitForEventsFunc { | |||
if !ok { | |||
byImage = sets.NewString() | |||
pulls[image] = byImage | |||
fmt.Printf("[sig-arch] unknown image: %s\n", image) |
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 is not needed, we print them in the next if clause.
err := ocAdmin.Run("create").Args("-f", oauthAccessTokenFile).Execute() | ||
o.Expect(err).NotTo(o.HaveOccurred()) | ||
|
||
out, err := ocAdmin.Run("describe").Args("oauthaccesstoken", "sha256~efaca6fab897953ffcb4f857eb5cbf2cf3a4c33f1314b4922656303426b1cfc9").Output() |
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: you forgot to drop that from basicresource.sh here:
origin/test/extended/testdata/cmd/test/cmd/basicresources.sh
Lines 198 to 201 in e000efe
# Test OAuth access token describer | |
os::cmd::expect_success 'oc create -f ${TEST_DATA}/oauthaccesstoken.yaml' | |
os::cmd::expect_success_and_text "oc describe oauthaccesstoken sha256~efaca6fab897953ffcb4f857eb5cbf2cf3a4c33f1314b4922656303426b1cfc9" "efaca6fab897953ffcb4f857eb5cbf2cf3a4c33f1314b4922656303426b1cfc9" | |
echo "OAuth descriptor: ok" |
@@ -176,3 +179,46 @@ func writeObjectToFile(obj runtime.Object) (string, error) { | |||
|
|||
return name, nil | |||
} | |||
|
|||
// replaceImageInFile reads in a file, replaces the given image name, then writes to a new temporary file. | |||
func replaceImageInFile(source, oldImage, newImage string) (string, error) { |
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 a fan of manually replacing like so, I'd suggest using templates similarly how we do that upstream, see:
origin/vendor/k8s.io/kubernetes/test/e2e/kubectl/kubectl.go
Lines 296 to 303 in e000efe
ginkgo.BeforeEach(func() { | |
updateDemoRoot := "test/fixtures/doc-yaml/user-guide/update-demo" | |
data, err := e2etestfiles.Read(filepath.Join(updateDemoRoot, "nautilus-rc.yaml.in")) | |
if err != nil { | |
framework.Fail(err.Error()) | |
} | |
nautilus = commonutils.SubstituteImageName(string(data)) | |
}) |
/retest |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deejross, soltysh 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 |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
8 similar comments
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
@deejross: All pull requests linked via external trackers have merged: Bugzilla bug 1992596 has been moved to the MODIFIED state. 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. |
Moved more of the basicresources.sh over to Go tests, restored a missing fixture, and provide a way to replace images used in fixtures to ensure we always use known images.