Skip to content

Commit

Permalink
Check that all variables are defined in the config (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrrr authored Sep 23, 2024
1 parent d2b76e8 commit 266d6e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion hunter/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def load_test_groups(config: Dict, tests: Dict[str, TestConfig]) -> Dict[str, Li
def load_config_from(config_file: Path) -> Config:
"""Loads config from the specified location"""
try:
content = expandvars(config_file.read_text())
content = expandvars(config_file.read_text(), nounset=True)
yaml = YAML(typ="safe")
config = yaml.load(content)
"""
Expand Down
8 changes: 4 additions & 4 deletions tests/resources/sample_config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Please place this file in `~/.hunter/hunter.yaml` and provide the missing config values:
fallout:
url: https://fallout.sjc.dsinternal.org/
user: ${FALLOUT_USER}
token: ${FALLOUT_OAUTH_TOKEN}
user: FALLOUT_USER
token: FALLOUT_OAUTH_TOKEN

graphite:
url: http://history.sjc.dsinternal.org/
Expand All @@ -17,8 +17,8 @@ graphite:

grafana:
url: http://history.datastax.lan:3000/
user: ${GRAFANA_USER}
password: ${GRAFANA_PASSWORD}
user: GRAFANA_USER
password: GRAFANA_PASSWORD

# Templates define common bits shared between test definitions
templates:
Expand Down

0 comments on commit 266d6e5

Please sign in to comment.