-
Notifications
You must be signed in to change notification settings - Fork 242
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
Conversation
} | ||
Expect(err).NotTo(HaveOccurred()) | ||
|
||
Expect(pullSecretPath).NotTo(BeEmpty()) |
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 can't be empty
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.
Can we make the commit msg a bit por explicit on what is being checked with the change?
/retest-required |
22fdc2f
to
b59633f
Compare
test/integration/testsuite_test.go
Outdated
} | ||
|
||
func RegisterFlags(flags *flag.FlagSet) { | ||
flags.StringVar(&bundlePath, "bundle_path", "", "Path to the bundle to be used in 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.
typically the format would be mid-separator. i.e. bundle-path
instead of bundle_path
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.
Same for pull-secret-path
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, I will fix it.
test/integration/testsuite_test.go
Outdated
|
||
logrus.Infof("Error: You need to set PULL_SECRET_PATH to find CRC useful.") | ||
logrus.Infof("%v", err) | ||
if pullSecretPath == "" { |
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.
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
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 see. Let me fix it.
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.
Ahh wait after the revert d9e501b this should be changed on images/build-integration/lib/darwin/run.sh
too
@lilyLuLiu: The following tests failed, say
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. |
[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 |
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