Fix tests
Doing a =~ regexp check doesn't do anything in itself...
This commit is contained in:
parent
19d4e40dfc
commit
c382ad1e17
@ -25,7 +25,7 @@ import ./make-test.nix {
|
|||||||
|
|
||||||
testScript =
|
testScript =
|
||||||
''
|
''
|
||||||
$machine->succeed("nixos-container list") =~ /webserver/;
|
$machine->succeed("nixos-container list") =~ /webserver/ or die;
|
||||||
|
|
||||||
# Start the webserver container.
|
# Start the webserver container.
|
||||||
$machine->succeed("nixos-container start webserver");
|
$machine->succeed("nixos-container start webserver");
|
||||||
@ -65,7 +65,7 @@ import ./make-test.nix {
|
|||||||
$machine->succeed("nixos-container start $id1");
|
$machine->succeed("nixos-container start $id1");
|
||||||
|
|
||||||
# Execute commands via the root shell.
|
# 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");
|
$machine->succeed("nixos-container set-root-password $id1 foobar");
|
||||||
|
|
||||||
# Destroy the containers.
|
# Destroy the containers.
|
||||||
|
@ -40,7 +40,7 @@ in
|
|||||||
# Mount the stick as a non-root user and do some stuff with it.
|
# 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 --enumerate | grep /org/freedesktop/UDisks/devices/sda1'");
|
||||||
$machine->succeed("su - alice -c 'udisks --mount /dev/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'");
|
$machine->succeed("su - alice -c 'echo foo > /media/USBSTICK/bar.txt'");
|
||||||
|
|
||||||
# Unmounting the stick should make the mountpoint disappear.
|
# Unmounting the stick should make the mountpoint disappear.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user