-
Notifications
You must be signed in to change notification settings - Fork 244
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 'odo version' integration test #3325
Comments
What is the fact pattern for Server URL? |
http(s)://localhost:6443 |
Do we really need to check that the version conforms to a regexp? Isn't it enough to check that it returns something for the |
@metacosm No, because the server output pattern deserves a validation to get precise field validation for integration test. |
@amitkrout care to explain in greater details, please? |
@metacosm Does it make sense ? |
@amitkrout sure but then wouldn’t it make more sense to retrieve the url of the cluster independently in the test and check that odo returns that instead of checking that it conforms to a regexp, which, while better than nothing, actually doesn’t check that odo returns the proper value? |
@amitkrout or retrieve the URL from the |
@metacosm Our circumstance is like, as a prerequisite we need to login to the cluster first then we start executing the test spec for example |
@amitkrout that test is not really useful though… what is it checking exactly? For example, if It'd be better, in my mind, to retrieve the server URL after logging into it (for example, parsing the output of |
yup, for hardcoded values that falls under the re pattern won't report failure.
+1, It will be easy to parse and match machine readable output for example |
/kind bug
What versions of software are you using?
Operating System:
Red Hat Enterprise Linux 8.2 (Ootpa)
Output of
odo version
:odo v1.2.2 (b815649)
How did you run odo exactly?
make test-generic
Actual behavior
/should show the version of odo major components including server login UR
should show the version of odo major components including server login URL [It]
go/src/github.com/openshift/odo/tests/integration/generic_test.go:267
/go/src/github.com/openshift/odo/tests/integration/generic_test.go:277
Expected behavior
The case passed
Any logs, error output, etc?
To test the command
odo version
include the server URL, There is regexp :Server:\s*https:\/\/(.+\.com|([0-9]+.){3}[0-9]+):[0-9]{4}
The regexp is not correct for all possible URL. For example:
Server: https://api.ocp43b.rhocp.boe:6443
is not match ,Server: https://api.ocp-test.redhat.com:6443
is match.The text was updated successfully, but these errors were encountered: