diff options
author | Chad Smith <chad.smith@canonical.com> | 2023-01-09 03:45:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-09 11:45:57 +0100 |
commit | 2b738212582811ff472f11d36df20e9d2826494b (patch) | |
tree | e3ea4ed2a4f064881340a1c95abf3ef8cd6214d9 | |
parent | d1e237d22deeb7dde724bdc5495b5cbbe8914404 (diff) | |
download | cloud-init-git-2b738212582811ff472f11d36df20e9d2826494b.tar.gz |
tests: test_lxd assert features.networks.zones when present (#1939)
LXD v 5.9 introduces a features.networks.zones default.
Assert features.networks.zones when host provides this key.
Cope with versions that do not surface this config.
-rw-r--r-- | tests/integration_tests/modules/test_lxd.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/integration_tests/modules/test_lxd.py b/tests/integration_tests/modules/test_lxd.py index 44cf5ee5..f84cdff6 100644 --- a/tests/integration_tests/modules/test_lxd.py +++ b/tests/integration_tests/modules/test_lxd.py @@ -219,6 +219,10 @@ def validate_preseed_projects(client: IntegrationInstance, preseed_cfg): # https://discuss.linuxcontainers.org/t/lxd-5-5-has-been-released/14899 if "features.storage.buckets" in project["config"]: assert "true" == project["config"].pop("features.storage.buckets") + # `features.networks.zones` was introduced in lxd 5.9. More info: + # https://discuss.linuxcontainers.org/t/lxd-5-9-has-been-released/ + if "features.networks.zones" in project["config"]: + assert "true" == project["config"].pop("features.networks.zones") assert project == src_project |