Skip to content
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

Merged
merged 1 commit into from Oct 6, 2021

Conversation

deejross
Copy link
Contributor

@deejross deejross commented Oct 4, 2021

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.

@openshift-ci openshift-ci bot added the bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. label Oct 4, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 4, 2021

@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
  • bug is open, matching expected state (open)
  • bug target release (4.10.0) matches configured target release for branch (4.10.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @zhouying7780

In response to this:

Bug 1992596: e2e/cli: More basicresources.sh

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.

@openshift-ci openshift-ci bot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Oct 4, 2021
@deejross
Copy link
Contributor Author

deejross commented Oct 4, 2021

/assign @soltysh

Copy link
Member

@soltysh soltysh left a 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)
Copy link
Member

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()
Copy link
Member

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:

# 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) {
Copy link
Member

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:

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))
})

@soltysh
Copy link
Member

soltysh commented Oct 5, 2021

/retest

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 5, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 5, 2021

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 5, 2021
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

8 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 9795ebb into openshift:master Oct 6, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 6, 2021

@deejross: All pull requests linked via external trackers have merged:

Bugzilla bug 1992596 has been moved to the MODIFIED state.

In response to this:

Bug 1992596: e2e/cli: More basicresources.sh

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants