Skip to content
Snippets Groups Projects
Commit fd3eb9b8 authored by ml bonhomme's avatar ml bonhomme :bee:
Browse files

no updating self.config

parent b65d2e9e
No related branches found
No related tags found
1 merge request!172update self.config with default user_configuration values
Pipeline #79240 passed
......@@ -171,12 +171,12 @@ class BaseWorker(object):
)
self.config = worker_version["configuration"]["configuration"]
if "user_configuration" in worker_version["configuration"]:
# Add default values (if set) from user configurable parameters to the base configuration
# Add default values (if set) to user_configuration
for key, value in worker_version["configuration"][
"user_configuration"
].items():
if "default" in value:
self.config.update({key: value["default"]})
self.user_configuration.update({key: value["default"]})
self.worker_details = worker_version["worker"]
required_secrets = worker_version["configuration"].get("secrets", [])
elif self.args.config:
......
......@@ -211,9 +211,8 @@ def test_configure_user_configuration_defaults(
)
worker.configure()
assert worker.config == {
"param_1": "/some/path/file.pth",
"param_2": 12,
assert worker.config == {"param_1": "/some/path/file.pth", "param_2": 12}
assert worker.user_configuration == {
"param_3": "Animula vagula blandula",
"param_5": True,
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment