aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobert Hensing <roberth@users.noreply.github.com>2023-09-21 13:13:16 +0200
committerGitHub <noreply@github.com>2023-09-21 13:13:16 +0200
commita4445859abca0de3d8927c0719cbefc31d1dadbf (patch)
tree6c4116d254e9b0323b5d0db1abd62793273da234 /tests
parent40a014416b245273e2d5ab50a372cd9468d63cb9 (diff)
parentf3005632c417615d2cf3a6d102d0f4f041d8b2b7 (diff)
Merge pull request #9009 from NixOS/backport-9008-to-2.18-maintenance
[Backport 2.18-maintenance] Re-enable systemd-nspawn test
Diffstat (limited to 'tests')
-rw-r--r--tests/nixos/containers/containers.nix4
-rw-r--r--tests/nixos/containers/systemd-nspawn.nix2
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/nixos/containers/containers.nix b/tests/nixos/containers/containers.nix
index e721be48f..c8ee78a4a 100644
--- a/tests/nixos/containers/containers.nix
+++ b/tests/nixos/containers/containers.nix
@@ -56,8 +56,8 @@
host.fail("nix build -v --auto-allocate-uids --no-sandbox -L --offline --impure --file ${./id-test.nix} --argstr name id-test-6 --arg uidRange true")
# Run systemd-nspawn in a Nix build.
- #host.succeed("nix build -v --auto-allocate-uids --sandbox -L --offline --impure --file ${./systemd-nspawn.nix} --argstr nixpkgs ${nixpkgs}")
- #host.succeed("[[ $(cat ./result/msg) = 'Hello World' ]]")
+ host.succeed("nix build -v --auto-allocate-uids --sandbox -L --offline --impure --file ${./systemd-nspawn.nix} --argstr nixpkgs ${nixpkgs}")
+ host.succeed("[[ $(cat ./result/msg) = 'Hello World' ]]")
'';
}
diff --git a/tests/nixos/containers/systemd-nspawn.nix b/tests/nixos/containers/systemd-nspawn.nix
index f54f32f2a..1dad4ebd7 100644
--- a/tests/nixos/containers/systemd-nspawn.nix
+++ b/tests/nixos/containers/systemd-nspawn.nix
@@ -73,6 +73,8 @@ runCommand "test"
--resolv-conf=off \
--bind-ro=/nix/store \
--bind=$out \
+ --bind=/proc:/run/host/proc \
+ --bind=/sys:/run/host/sys \
--private-network \
$toplevel/init
''