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

fix small bug in integration test #4184

Merged
merged 1 commit into from
Jun 5, 2024
Merged

fix small bug in integration test #4184

merged 1 commit into from
Jun 5, 2024

Conversation

lilyLuLiu
Copy link
Contributor

Fixes: There is a small bug in the integration test

Solution/Idea

In the BeforeSuite function, judge whether the environmental variables ginkgoOpts and pullSecretPath exist.

Proposed changes

  1. os.Getenv() not return err. We should check whether the environment string is empty.

}
Expect(err).NotTo(HaveOccurred())

Expect(pullSecretPath).NotTo(BeEmpty())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 this can't be empty

@adrianriobo
Copy link
Contributor

Hey we need to fix #4185 before do anything else on e2e or integration. On the other this is a good check but we can sync on this as may we should pass parameters the "right way".

This is an example on how to use params. But again we can discuss about it an decide how to tackle it.

Copy link
Contributor

@adrianriobo adrianriobo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make the commit msg a bit por explicit on what is being checked with the change?

@lilyLuLiu
Copy link
Contributor Author

/retest-required

@lilyLuLiu lilyLuLiu force-pushed the main branch 2 times, most recently from 22fdc2f to b59633f Compare June 4, 2024 08:32
}

func RegisterFlags(flags *flag.FlagSet) {
flags.StringVar(&bundlePath, "bundle_path", "", "Path to the bundle to be used in tests.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typically the format would be mid-separator. i.e. bundle-path instead of bundle_path

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for pull-secret-path

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I will fix it.


logrus.Infof("Error: You need to set PULL_SECRET_PATH to find CRC useful.")
logrus.Infof("%v", err)
if pullSecretPath == "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry did not see this before, for golang this is commonly done:

if len(pullSecretPath) == 0 {....

As so in case the var at some point is set to nil it will pass on this condition, but for the equal empty string will throw panic error

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Let me fix it.

Copy link
Contributor

@adrianriobo adrianriobo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh wait after the revert d9e501b this should be changed on images/build-integration/lib/darwin/run.sh too

@openshift-ci openshift-ci bot removed the lgtm label Jun 4, 2024
Copy link

openshift-ci bot commented Jun 5, 2024

@lilyLuLiu: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/images 45ab6b5 link true /test images
ci/prow/integration-crc 45ab6b5 link true /test integration-crc
ci/prow/security 45ab6b5 link false /test security
ci/prow/e2e-microshift-crc 45ab6b5 link true /test e2e-microshift-crc
ci/prow/e2e-crc 45ab6b5 link true /test e2e-crc

Full PR test history. Your PR dashboard.

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-sigs/prow repository. I understand the commands that are listed here.

@openshift-ci openshift-ci bot added the lgtm label Jun 5, 2024
Copy link

openshift-ci bot commented Jun 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adrianriobo

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 label Jun 5, 2024
@lilyLuLiu lilyLuLiu merged commit ecaec27 into crc-org:main Jun 5, 2024
12 of 29 checks passed
lilyLuLiu added a commit to lilyLuLiu/release that referenced this pull request Jun 11, 2024
lilyLuLiu added a commit to lilyLuLiu/release that referenced this pull request Jun 11, 2024
lilyLuLiu added a commit to lilyLuLiu/release that referenced this pull request Jun 14, 2024
openshift-merge-bot bot pushed a commit to openshift/release that referenced this pull request Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants