Verified Commit 08deff3d authored by David Runge's avatar David Runge
Browse files

config: Raise when there are no project configurations

arch_release_promotion/config.py:
Raise RuntimeError if there are no configuration files to be read.

tests/test_config.py:
Adapt tests for the case where there are no configuration files
supplied.
parent 69a13bcc
Pipeline #10239 passed with stages
in 54 seconds
......@@ -135,6 +135,8 @@ def read_projects_conf(settings: BaseSettings) -> Dict[str, Any]:
if config_files:
config.update(toml.load(config_files))
else:
raise RuntimeError("There are no project configuration files!")
return config
......
......@@ -110,6 +110,12 @@ def test_settings(
False,
[],
"",
raises(RuntimeError),
),
(
True,
[],
"",
raises(ValidationError),
),
],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment