Skip to content

Commit

Permalink
ci: use lxd from edge
Browse files Browse the repository at this point in the history
Testing for canonical/lxd#12829

Signed-off-by: Callahan Kovacs <[email protected]>
  • Loading branch information
mr-cal committed Feb 8, 2024
1 parent e8a3231 commit 44b4328
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion craft_providers/lxd/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion tests/integration/lxd/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 44b4328

Please sign in to comment.