summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Smith <chad.smith@canonical.com>2022-11-12 11:36:59 -0700
committerGitHub <noreply@github.com>2022-11-12 12:36:59 -0600
commitf5b0930665ac36e853f254c3db681b6f4368e691 (patch)
tree4b318c0e4691d863739c9f839652e4dab5571aac
parent661b852c004f8c151ac9da22dc4ef6d8ef96bc4b (diff)
downloadcloud-init-git-f5b0930665ac36e853f254c3db681b6f4368e691.tar.gz
tests: test_lxd assert features.storage.buckets when present (#1827)
LXD v 5.5 introduces a features.storage.buckets default. Assert features.storage.buckets when host provides this key. Cope with versions that do not surface this config.
-rw-r--r--tests/integration_tests/modules/test_lxd.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/integration_tests/modules/test_lxd.py b/tests/integration_tests/modules/test_lxd.py
index 9f0cff10..01d35613 100644
--- a/tests/integration_tests/modules/test_lxd.py
+++ b/tests/integration_tests/modules/test_lxd.py
@@ -218,14 +218,8 @@ def validate_preseed_projects(client: IntegrationInstance, preseed_cfg):
# `features.storage.buckets` was introduced in lxd 5.5 . More info:
# https://discuss.linuxcontainers.org/t/lxd-5-5-has-been-released/14899
- if ImageSpecification.from_os_image().release in (
- "bionic",
- "focal",
- "jammy",
- ):
- src_project["config"].pop("features.storage.buckets", None)
- project["config"].pop("features.storage.buckets", None)
-
+ if "features.storage.buckets" in project["config"]:
+ assert "true" == project["config"].pop("features.storage.buckets")
assert project == src_project