Skip to content

Commit

Permalink
Merge pull request #9008 from cole-h/re-enable-nspawn-test
Browse files Browse the repository at this point in the history
Re-enable systemd-nspawn test
  • Loading branch information
edolstra authored Sep 20, 2023
2 parents d3f866c + 883092e commit 3ce793d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/nixos/containers/containers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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' ]]")
'';

}
2 changes: 2 additions & 0 deletions tests/nixos/containers/systemd-nspawn.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
''

0 comments on commit 3ce793d

Please sign in to comment.