containers: add test that stopping and starting a container works (#4989)

This commit is contained in:
Aristid Breitkreuz 2014-11-24 23:19:34 +01:00
parent b216e2b8e6
commit 82f2be6a26

View File

@ -91,6 +91,13 @@ import ./make-test.nix {
# Execute commands via the root shell. # Execute commands via the root shell.
$machine->succeed("nixos-container run $id1 -- uname") =~ /Linux/ or die; $machine->succeed("nixos-container run $id1 -- uname") =~ /Linux/ or die;
# Stop and start (regression test for #4989)
$machine->succeed("nixos-container stop $id1");
$machine->succeed("nixos-container start $id1");
# Execute commands via the root shell.
$machine->succeed("nixos-container run $id1 -- uname") =~ /Linux/ or die;
# Destroy the containers. # Destroy the containers.
$machine->succeed("nixos-container destroy $id1"); $machine->succeed("nixos-container destroy $id1");
$machine->succeed("nixos-container destroy $id2"); $machine->succeed("nixos-container destroy $id2");