mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
Fix tests
Doing a =~ regexp check doesn't do anything in itself...
This commit is contained in:
parent
19d4e40dfc
commit
c382ad1e17
2 changed files with 3 additions and 3 deletions
|
@ -25,7 +25,7 @@ import ./make-test.nix {
|
|||
|
||||
testScript =
|
||||
''
|
||||
$machine->succeed("nixos-container list") =~ /webserver/;
|
||||
$machine->succeed("nixos-container list") =~ /webserver/ or die;
|
||||
|
||||
# Start the webserver container.
|
||||
$machine->succeed("nixos-container start webserver");
|
||||
|
@ -65,7 +65,7 @@ import ./make-test.nix {
|
|||
$machine->succeed("nixos-container start $id1");
|
||||
|
||||
# Execute commands via the root shell.
|
||||
$machine->succeed("nixos-container run $id1 -- uname") =~ /Linux/;
|
||||
$machine->succeed("nixos-container run $id1 -- uname") =~ /Linux/ or die;
|
||||
$machine->succeed("nixos-container set-root-password $id1 foobar");
|
||||
|
||||
# Destroy the containers.
|
||||
|
|
|
@ -40,7 +40,7 @@ in
|
|||
# Mount the stick as a non-root user and do some stuff with it.
|
||||
$machine->succeed("su - alice -c 'udisks --enumerate | grep /org/freedesktop/UDisks/devices/sda1'");
|
||||
$machine->succeed("su - alice -c 'udisks --mount /dev/sda1'");
|
||||
$machine->succeed("su - alice -c 'cat /media/USBSTICK/test.txt'") =~ /Hello World/;
|
||||
$machine->succeed("su - alice -c 'cat /media/USBSTICK/test.txt'") =~ /Hello World/ or die;
|
||||
$machine->succeed("su - alice -c 'echo foo > /media/USBSTICK/bar.txt'");
|
||||
|
||||
# Unmounting the stick should make the mountpoint disappear.
|
||||
|
|
Loading…
Reference in a new issue