-
Notifications
You must be signed in to change notification settings - Fork 32
♻️ Maintenance: removes legacy app-config fixture tests from web-server #7022
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
♻️ Maintenance: removes legacy app-config fixture tests from web-server #7022
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7022 +/- ##
==========================================
- Coverage 86.35% 83.09% -3.26%
==========================================
Files 1226 669 -557
Lines 52507 32388 -20119
Branches 1271 262 -1009
==========================================
- Hits 45344 26914 -18430
+ Misses 6925 5414 -1511
+ Partials 238 60 -178
Continue to review full report in Codecov by Sentry.
|
mrnicegyu11
left a comment
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.
lgtm
services/web/server/src/simcore_service_webserver/application_settings.py
Outdated
Show resolved
Hide resolved
e47f418 to
e1712c1
Compare
GitHK
left a comment
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 a lot. Just some minor things and questions
services/web/server/tests/unit/with_dbs/04/garbage_collector/test_resource_manager.py
Show resolved
Hide resolved
services/web/server/tests/unit/with_dbs/04/garbage_collector/test_resource_manager.py
Outdated
Show resolved
Hide resolved
|



What do these changes do?
TL;DR
Remove legacy
app_configfixtures fromweb/server/tests♻️ Removing
app_configfixturesThis PR updates the web-server tests by removing outdated
app_configfixtures. These fixtures were remnants from a time before the introduction ofApplicationSettings, when the application was initialized using configuration files. Although the functionality to initialize the app with config files was removed long ago, the test setup still relied on these legacy fixtures.To bridge the gap during the transition, we used a converter function,
monkeypatch_setenv_from_app_config(implemented as a fixture factory), which took the old configuration files and translated them into equivalent environment variables compatible withApplicationSettings. This PR adapts the remaining fixtures depending mechanism so we can finally remove allapp_configlegacy from the code (and move on).Remember that the workflow to create a client that tests the app in
web/server/testsisapp_environmentfixture mocks test env varsweb_serverfixture creates app and runs on top of aTestServerclientfixture produces aTestClientthat connects toweb_serverOther refactoring ♻️:
projects._common.modelsAnnotated-fields inApplicationSettingsRelated issue/s
How to test
Dev-ops
.env-develalphabetically