Skip to content

Commit

Permalink
robustify the fake secrets maker: don't try to read the config file i…
Browse files Browse the repository at this point in the history
…f you're not asked to preserve some of those secrets
  • Loading branch information
rogthefrog committed Nov 27, 2024
1 parent 4a22555 commit d323d58
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/modelgauge_tests/fake_secrets.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ def description(cls) -> SecretDescription:
def fake_all_secrets(value="some-value", use_real_secrets_for: list[str] | None = None) -> RawSecrets:
secrets = get_all_secrets()
raw_secrets: Dict[str, Dict[str, str]] = {}
real_secrets = load_secrets_from_config()
if use_real_secrets_for:
real_secrets = load_secrets_from_config()
else:
real_secrets = {}

for secret in secrets:
if secret.scope not in raw_secrets:
Expand Down

0 comments on commit d323d58

Please sign in to comment.