Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

~/.zaza.yaml confuses unit tests #573

Open
sabaini opened this issue Sep 2, 2022 · 0 comments
Open

~/.zaza.yaml confuses unit tests #573

sabaini opened this issue Sep 2, 2022 · 0 comments

Comments

@sabaini
Copy link
Contributor

sabaini commented Sep 2, 2022

Buglet: if a ~/.zaza.yaml is present this leaks into Zazas' unit tests

cat ~/.zaza.yaml
---
model_settings:
    default-series: bionic
    logging-config: "<root>=INFO;unit=DEBUG"

In a clean checkout of zaza:

tox -e py3     
...
FAIL: test_get_model_settings_multiple_values_override (unit_tests.utilities.test_deployment_env.TestUtilitiesDeploymentEnv)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/peter/tmp/zaza/unit_tests/utilities/test_deployment_env.py", line 65, in test_get_model_settings_multiple_values_override
    self.base_get_model_settings(
  File "/home/peter/tmp/zaza/unit_tests/utilities/test_deployment_env.py", line 57, in base_get_model_settings
    self.assertEqual(deployment_env.get_model_settings(), expect)
AssertionError: {'default-series': 'bionic', 'image-stream': 'daily', 'test-m[189 chars]BUG'} != {'default-series': 'xenial', 'image-stream': 'daily', 'test-m[145 chars]rue'}
  {'automatically-retry-hooks': 'false',
-  'default-series': 'bionic',
?                     ^^^  ^

+  'default-series': 'xenial',
?                     ^^  ^^

   'enable-os-upgrade': 'false',
   'image-stream': 'daily',
-  'logging-config': '<root>=INFO;unit=DEBUG',
...

Moving ~/.zaza.yaml aside makes unit tests succeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant