Fix tests

Doing a =~ regexp check doesn't do anything in itself...
This commit is contained in:
Eelco Dolstra 2014-04-16 16:09:32 +02:00
parent 19d4e40dfc
commit c382ad1e17
2 changed files with 3 additions and 3 deletions

View file

@ -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.

View file

@ -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.