Enhance ISO selection logic and update documentation for improved clarity and usage instructions
This commit is contained in:
parent
b6886cb34a
commit
9a7bd81d17
12 changed files with 287 additions and 16 deletions
|
|
@ -20,6 +20,7 @@ def test_settings_load_defaults_and_normalize_api_base() -> None:
|
|||
assert settings.proxmox_api_base == "/api2/json"
|
||||
assert settings.proxmox_verify_tls is False
|
||||
assert settings.request_timeout_seconds == 15
|
||||
assert settings.default_iso_selector is None
|
||||
assert settings.effective_username == "root@pam"
|
||||
assert settings.safety_policy.prevent_create is False
|
||||
assert settings.safety_policy.enable_test_mode is False
|
||||
|
|
@ -54,3 +55,13 @@ def test_settings_allow_create_by_default_when_prevent_flag_is_unset() -> None:
|
|||
|
||||
assert settings.safety_policy.prevent_create is False
|
||||
assert settings.safety_policy.allow_create is True
|
||||
|
||||
|
||||
def test_settings_reject_invalid_default_iso_regex_selector() -> None:
|
||||
with pytest.raises(SettingsError):
|
||||
AppSettings.from_env(
|
||||
{
|
||||
"PROXMOX_DEFAULT_ISO_SELECTOR": "regex:[unterminated",
|
||||
},
|
||||
load_dotenv_file=False,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue