-
Notifications
You must be signed in to change notification settings - Fork 32
♻️ Maintenance: Unify ApplicationSettings Testing Across Services and Prepare for External Env File Support
#7919
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
Merged
pcrespov
merged 19 commits into
ITISFoundation:master
from
pcrespov:is7395/test-settings
Jun 22, 2025
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
de3aeb2
fixes DeprecationWarning: `example` has been deprecated, please use …
pcrespov 5cea865
🐛 Improve logging for external envfile loading and rename test functi…
pcrespov 8a18815
updates catalog
pcrespov 888b5bf
director
pcrespov 031ee68
payments
pcrespov 9b9952e
✨ Add new test configuration for external envfile support in pytest
pcrespov a8d521f
🐛 Rename fixture parameters for consistency in test files
pcrespov 9ef97fb
ensures all test settings
pcrespov fb0cb7d
fix pylint
pcrespov 240feca
fixing tests
pcrespov 8472a34
fixing tests
pcrespov a375178
fix
pcrespov 8eb8633
rm external_envfile_dict
pcrespov db5ee3c
undoc
pcrespov f3e3fb3
@GitHK review: doc
pcrespov 25150b6
@sanderegg review: doc
pcrespov 39c2359
@sanderegg review: add user prompt
pcrespov 31b5d61
rename skip_if_external_envfile_dict to skip_if_no_external_envfile f…
pcrespov ef422ad
Merge branch 'master' into is7395/test-settings
pcrespov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # pylint: disable=unused-variable | ||
| # pylint: disable=unused-argument | ||
| # pylint: disable=redefined-outer-name | ||
|
|
||
|
|
||
| from pytest_simcore.helpers.monkeypatch_envs import ( | ||
| EnvVarsDict, | ||
| ) | ||
| from simcore_service_agent.core.settings import ApplicationSettings | ||
|
|
||
|
|
||
| def test_valid_application_settings(mock_environment: EnvVarsDict): | ||
| assert mock_environment | ||
|
|
||
| settings = ApplicationSettings() # type: ignore | ||
pcrespov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| assert settings | ||
|
|
||
| assert settings == ApplicationSettings.create_from_envs() | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
services/dynamic-scheduler/tests/unit/test_core_settings.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # pylint: disable=unused-variable | ||
| # pylint: disable=unused-argument | ||
| # pylint: disable=redefined-outer-name | ||
|
|
||
|
|
||
| from pytest_simcore.helpers.monkeypatch_envs import ( | ||
| EnvVarsDict, | ||
| ) | ||
| from simcore_service_dynamic_scheduler.core.settings import ApplicationSettings | ||
|
|
||
|
|
||
| def test_valid_application_settings(app_environment: EnvVarsDict): | ||
| assert app_environment | ||
|
|
||
| settings = ApplicationSettings() # type: ignore | ||
| assert settings | ||
| assert settings == ApplicationSettings.create_from_envs() |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.