Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Britaliope authored and xoxys committed Sep 4, 2023
1 parent 3c10af5 commit c8c174c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions prometheuspvesd/test/data/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 12 additions & 0 deletions prometheuspvesd/test/fixtures/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions prometheuspvesd/test/unit/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c8c174c

Please sign in to comment.