-
Notifications
You must be signed in to change notification settings - Fork 243
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 absolute path for test on macos #4139
Fix absolute path for test on macos #4139
Conversation
Skipping CI for Draft Pull Request. |
4ffaa69
to
a40de3a
Compare
/retest |
@@ -308,8 +308,13 @@ func componentTests(args ...string) { | |||
relativeContext := fmt.Sprintf("..%c%s", filepath.Separator, filepath.Base(commonVar.Context)) | |||
fmt.Printf("relativeContext = %#v\n", relativeContext) | |||
|
|||
helper.CmdShouldPass("odo", append(args, "create", "--s2i", "java:8", "sb-jar-test", "--project", | |||
commonVar.Project, "--binary", filepath.Join(commonVar.Context, "sb.jar"), "--context", relativeContext)...) | |||
if runtime.GOOS == "darwin" { |
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.
whats the difference between these two conditions?
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.
helper.CmdShouldPass("odo", append(args, "create", "--s2i", "java:8", "sb-jar-test", "--project",
commonVar.Project, "--binary", filepath.Join(commonVar.Context, "sb.jar"), "--context", relativeContext)...)
and
helper.CmdShouldPass("odo", append(args, "create", "--s2i", "java:8", "sb-jar-test", "--project",
commonVar.Project, "--binary", filepath.Join(commonVar.Context, "sb.jar"), "--context", relativeContext)...)
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.
For mac some how the test are using /private/var/.../afaf(random dir) to run test which is not the case for linux and windows, Changing the context passing according to working dir w.r.t test solves the issue.
I think I some how missed while saving and pushing my changes, i have updated the changes,
the change is like this
helper.CmdShouldPass("odo", append(args, "create", "--s2i", "java:8", "sb-jar-test", "--project",
commonVar.Project, "--binary", filepath.Join("/private",commonVar.Context, "sb.jar"), "--context", relativeContext)...)
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 but before there wasn't a "/private` in the filepath.Join, and I would suggest not force pushing the code
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.
Understood
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.
/approve
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
a40de3a
to
6d2fbaa
Compare
Codecov Report
@@ Coverage Diff @@
## master #4139 +/- ##
=========================================
Coverage ? 42.28%
=========================================
Files ? 154
Lines ? 13074
Branches ? 0
=========================================
Hits ? 5528
Misses ? 6954
Partials ? 592
Continue to review full report at Codecov.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: girishramnani 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 |
I verified the change locally on macOS and the test runs successfully. /lgtm |
Signed-off-by: anandrkskd anandrkskd@gmail.com
What type of PR is this?
/kind failing-test
What does does this PR do / why we need it:
This PR will fix mac context related issue for test.
Which issue(s) this PR fixes:
Fixes #3797
PR acceptance criteria:
Unit test
Integration test
Documentation
I have read the test guidelines
How to test changes / Special notes to the reviewer: