-
-
Notifications
You must be signed in to change notification settings - Fork 211
Feat: replaced hardcoded test server admin key with env variable #1568
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
base: main
Are you sure you want to change the base?
Changes from all commits
808ab63
f183d11
7a94293
325c328
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,7 @@ | |
|
|
||
| OPENML_CACHE_DIR_ENV_VAR = "OPENML_CACHE_DIR" | ||
| OPENML_SKIP_PARQUET_ENV_VAR = "OPENML_SKIP_PARQUET" | ||
| OPENML_TEST_SERVER_ADMIN_KEY_ENV_VAR = "OPENML_TEST_SERVER_ADMIN_KEY" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in case of using a |
||
| _TEST_SERVER_NORMAL_USER_KEY = "normaluser" | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -106,6 +106,10 @@ def test_setup_with_config(self): | |
|
|
||
|
|
||
| class TestConfigurationForExamples(openml.testing.TestBase): | ||
| @pytest.mark.skipif( | ||
| not os.environ.get(openml.config.OPENML_TEST_SERVER_ADMIN_KEY_ENV_VAR), | ||
| reason="Test requires admin key. Set OPENML_TEST_SERVER_ADMIN_KEY environment variable.", | ||
| ) | ||
| @pytest.mark.production() | ||
| def test_switch_to_example_configuration(self): | ||
| """Verifies the test configuration is loaded properly.""" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. btw this test passes anyways even if you use any random |
||
|
|
||
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.
we should make sure these are added in the github secrets before merging this