nixos/tests/incus: fix container importing

This commit is contained in:
Adam Stephens 2024-08-28 08:50:36 -04:00
parent a9372de666
commit 4d2a0cfb34
No known key found for this signature in database
2 changed files with 6 additions and 6 deletions

View File

@ -11,8 +11,8 @@ let
extra;
};
container-image-metadata = releases.incusContainerMeta.${pkgs.stdenv.hostPlatform.system};
container-image-rootfs = releases.incusContainerImage.${pkgs.stdenv.hostPlatform.system};
container-image-metadata = "${releases.incusContainerMeta.${pkgs.stdenv.hostPlatform.system}}/tarball/nixos-system-${pkgs.stdenv.hostPlatform.system}.tar.xz";
container-image-rootfs = "${releases.incusContainerImage.${pkgs.stdenv.hostPlatform.system}}/nixos-lxc-image-${pkgs.stdenv.hostPlatform.system}.squashfs";
in
{
inherit name;
@ -61,7 +61,7 @@ in
machine.succeed("incus admin init --minimal")
with subtest("Container image can be imported"):
machine.succeed("incus image import ${container-image-metadata}/*/*.tar.xz ${container-image-rootfs} --alias nixos")
machine.succeed("incus image import ${container-image-metadata} ${container-image-rootfs} --alias nixos")
with subtest("Container can be launched and managed"):
machine.succeed("incus launch nixos container")

View File

@ -16,8 +16,8 @@ import ../make-test-python.nix (
};
};
container-image-metadata = releases.incusContainerMeta.${pkgs.stdenv.hostPlatform.system};
container-image-rootfs = releases.incusContainerImage.${pkgs.stdenv.hostPlatform.system};
container-image-metadata = "${releases.incusContainerMeta.${pkgs.stdenv.hostPlatform.system}}/tarball/nixos-system-${pkgs.stdenv.hostPlatform.system}.tar.xz";
container-image-rootfs = "${releases.incusContainerImage.${pkgs.stdenv.hostPlatform.system}}/nixos-lxc-image-${pkgs.stdenv.hostPlatform.system}.squashfs";
in
{
name = "incusd-options";
@ -87,7 +87,7 @@ import ../make-test-python.nix (
machine.wait_for_unit("incus-preseed.service")
with subtest("Container image can be imported"):
machine.succeed("incus image import ${container-image-metadata}/*/*.tar.xz ${container-image-rootfs} --alias nixos")
machine.succeed("incus image import ${container-image-metadata} ${container-image-rootfs} --alias nixos")
with subtest("Container can be launched and managed"):
machine.succeed("incus launch nixos container")