From cb4e4b1c78b413aace6656213f81549b9e2cd954 Mon Sep 17 00:00:00 2001 From: Benjamin Schimke Date: Thu, 28 Nov 2024 10:05:02 +0100 Subject: [PATCH] Set default k8s snap track for registry (#852) The registry setup fails if we do not set config.SNAP. However, there a valid use cases, e.g. promotion tests in which a snap is not set. We don't really care about the concrete snap version that is deployed on the registry as it is only used to collect inspection reports. --- tests/integration/tests/test_util/registry.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/integration/tests/test_util/registry.py b/tests/integration/tests/test_util/registry.py index d795d9095..a4599f979 100644 --- a/tests/integration/tests/test_util/registry.py +++ b/tests/integration/tests/test_util/registry.py @@ -81,7 +81,11 @@ def __init__(self, h: Harness): self.add_mirrors() - setup_k8s_snap(self.instance, Path("/")) + # Setup the k8s snap on the instance. + # Use the latest/edge/classic channel as this version is only used to collect logs. + # This would fail if the `TEST_SNAP` environment variable is not set which however has + # valid use cases, e.g. in the promotion scenarios. + setup_k8s_snap(self.instance, Path("/"), "latest/edge/classic") def get_configured_mirrors(self) -> List[Mirror]: mirrors: List[Mirror] = []