-
Notifications
You must be signed in to change notification settings - Fork 53
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 user-journey tests for running against non-default targets #1050
Fix user-journey tests for running against non-default targets #1050
Conversation
✅ Deploy Preview for conda-store ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
5bd0b5e
to
ed8ef93
Compare
ed8ef93
to
2599844
Compare
4845702
to
4ba3ea9
Compare
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.
Thanks for this! Just one minor change requested.
verify = os.environ.get("CONDA_STORE_TEST_VERIFY_SSL", "true") | ||
return verify.lower() not in ("0", "false") |
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.
Nice catch 😬
@@ -136,7 +134,7 @@ def create_token( | |||
"""Create a token with a specified role in a specified namespace.""" | |||
json_data = { | |||
"primary_namespace": default_namespace, | |||
"expiration": time_utils.get_iso8601_time(1), | |||
# "expiration": time_utils.get_iso8601_time(1), |
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.
Hmm, I thought we needed an expiration time? If we don't, let's just remove this line.
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.
Nope, by default the api will set the expiry to the same expiration as the token that is making the request.
This line in particular was not generating the expiration in the right format so it was causing an error. By removing this line the generated token will get the default expiration value.
281147a
to
c34e7c7
Compare
Description
This PR makes a variety of fixes to the user journey tests in order to run them against non default targets (eg. like nebari's conda store deployment). This is required for nebari-dev/nebari#2895
Fix
CONDA_STORE_TEST_VERIFY_SSL
Previously setting any value for
CONDA_STORE_TEST_VERIFY_SSL
resulted in enabling ssl verification. So, settingCONDA_STORE_TEST_VERIFY_SSL=0
orCONDA_STORE_TEST_VERIFY_SSL=false
enabled ssl verification. This is because strings are truthy.This PR fixes this by checking if the passed in env var is one of
0
,false
orFalse
in order to determine if tests should verify SSL.Use
CONDA_STORE_TOKEN
Previously all but one conda-store user journey tests used the
CONDA_STORE_TOKEN
as auth when running tests. This PR extends this so that all user journey tests can use the provided auth token for auth.Ensure new api contexts are valid
Previously, some tests created new utils.API instances. However, the generated tokens had invalid expiry values and did not respect the SSL settings.
Pull request checklist