diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 06a8833d..9ea42972 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -135,7 +135,8 @@ jobs: echo "::group::Configure LXD" sudo groupadd --force --system lxd sudo usermod --append --groups lxd $USER - sudo snap refresh lxd --channel=latest/stable + sudo snap remove lxd --purge + sudo snap install lxd --channel=latest/edge sudo snap start lxd sudo lxd waitready --timeout=30 sudo lxd init --auto diff --git a/craft_providers/lxd/installer.py b/craft_providers/lxd/installer.py index 887cc592..091a8e58 100644 --- a/craft_providers/lxd/installer.py +++ b/craft_providers/lxd/installer.py @@ -50,7 +50,7 @@ def install(sudo: bool = True) -> str: cmd = ["sudo"] if sudo else [] - cmd += ["snap", "install", "lxd"] + cmd += ["snap", "install", "lxd", "--channel", "latest/edge"] try: subprocess.run(cmd, check=True) diff --git a/tests/integration/lxd/conftest.py b/tests/integration/lxd/conftest.py index 94ecb66a..d5331c5b 100644 --- a/tests/integration/lxd/conftest.py +++ b/tests/integration/lxd/conftest.py @@ -47,7 +47,9 @@ def installed_lxd_without_init(uninstalled_lxd): """ if os.environ.get("CRAFT_PROVIDERS_TESTS_ENABLE_LXD_INSTALL") != "1": pytest.skip("lxd not installed, skipped") - subprocess.run(["sudo", "snap", "install", "lxd"], check=True) + subprocess.run( + ["sudo", "snap", "install", "lxd", "--channel", "latest/edge"], check=True + ) subprocess.run(["sudo", "lxd", "waitready"], check=True) yield subprocess.run(["sudo", "lxd", "init", "--auto"], check=True)