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
windows path seperator fix #4234
windows path seperator fix #4234
Conversation
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
/lgtm |
@@ -89,35 +89,35 @@ var _ = Describe("odo supported images e2e tests", func() { | |||
}) | |||
|
|||
It("Should be able to verify the nodejs-10 image", func() { | |||
oc.ImportImageFromRegistry("registry.access.redhat.com", filepath.Join("rhoar-nodejs", "nodejs-10:latest"), "nodejs:latest", commonVar.Project) | |||
verifySupportedImage(filepath.Join("rhoar-nodejs", "nodejs-10:latest"), "nodejs", "nodejs:latest", commonVar.Project, appName, commonVar.Context) | |||
oc.ImportImageFromRegistry("registry.access.redhat.com", filepath.ToSlash(filepath.Join("rhoar-nodejs", "nodejs-10:latest")), "nodejs:latest", commonVar.Project) |
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.
You should not treat this as a file path. This is what got us into this situation in the first place.
Your solution would technically work, but it is still wrong and problematic.
Just providing the whole image name as a string is completely ok here (rhoar-nodejs/nodejs-10:latest
). The image name will always have /
as a separator.
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
/hold |
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
/test v4.5-integration-e2e |
@@ -89,35 +89,35 @@ var _ = Describe("odo supported images e2e tests", func() { | |||
}) | |||
|
|||
It("Should be able to verify the nodejs-10 image", func() { | |||
oc.ImportImageFromRegistry("registry.access.redhat.com", filepath.Join("rhoar-nodejs", "nodejs-10:latest"), "nodejs:latest", commonVar.Project) | |||
verifySupportedImage(filepath.Join("rhoar-nodejs", "nodejs-10:latest"), "nodejs", "nodejs:latest", commonVar.Project, appName, commonVar.Context) | |||
oc.ImportImageFromRegistry("registry.access.redhat.com", "rhoar-nodejs"+"/"+"nodejs-10:latest", "nodejs:latest", commonVar.Project) |
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.
Why are you using +
to concatenate two strings like this?
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 miss understood the above comment, Just providing the whole image name as a string is okay but in the helper function well will require to concatenate should I use string.join?
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.
just do "rhoar-nodejs/nodejs-10:latest"
here, no need to complicate it
tests/helper/helper_oc.go
Outdated
CmdShouldPass(oc.path, "--request-timeout", "5m", "import-image", cmpType, "--namespace="+project, "--from="+filepath.Join(registry, image), "--confirm") | ||
CmdShouldPass(oc.path, "annotate", filepath.Join("istag", cmpType), "--namespace="+project, "tags=builder", "--overwrite") | ||
CmdShouldPass(oc.path, "--request-timeout", "5m", "import-image", cmpType, "--namespace="+project, "--from="+registry+"/"+image, "--confirm") | ||
CmdShouldPass(oc.path, "annotate", filepath.ToSlash(filepath.Join("istag", cmpType)), "--namespace="+project, "tags=builder", "--overwrite") |
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.
Don't use filepath if it is not file path.
just do
fmt.Sprintf("istag/%s", cmpType)
or "istag/"+ cmpType
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
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
/test v4.5-integration-e2e |
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
/lgtm |
/hold cancel |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kadel 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 |
/test v4.6-integration-e2e |
Signed-off-by: anandrkskd anandrkskd@gmail.com
What type of PR is this?
/kind bug
What does does this PR do / why we need it:
This PR will Fix image source for E2E test image.
Which issue(s) this PR fixes:
Fixes #3389
Fixes #4235
PR acceptance criteria:
Unit test
Integration test
Documentation
I have read the test guidelines
How to test changes / Special notes to the reviewer: