fix tests

This commit is contained in:
Bruno MATEU 2023-06-18 14:35:19 +02:00 committed by Robert Kaussow
parent 12a53f5c89
commit 6a254f76f1
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
3 changed files with 16 additions and 0 deletions

View File

@ -24,5 +24,7 @@ pve:
server: proxmox.example.com
user: root
password: secure
token_name: pve_sd
token_value: 01234567-89ab-cdef-0123-456789abcdef
auth_timeout: 5
verify_ssl: true

View File

@ -114,6 +114,18 @@ def builtins():
"file": True,
"type": environs.Env().str
},
"pve.token_name": {
"default": "dummyname",
"env": "PVE_TOKEN_NAME",
"file": True,
"type": environs.Env().str
},
"pve.token_value": {
"default": "dummyvalue",
"env": "PVE_TOKEN_VALUE",
"file": True,
"type": environs.Env().str
},
"pve.auth_timeout": {
"default": 5,
"env": "PVE_AUTH_TIMEOUT",

View File

@ -19,6 +19,8 @@ def test_yaml_config(mocker, defaults):
defaults["pve"]["user"] = "root"
defaults["pve"]["password"] = "secure"
defaults["pve"]["server"] = "proxmox.example.com"
defaults["pve"]["token_name"] = "pve_sd"
defaults["pve"]["token_value"] = "01234567-89ab-cdef-0123-456789abcdef"
assert config.config == defaults