mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-31 06:31:20 +00:00
nixosTests.env: Port to Python
This commit is contained in:
parent
46fab2e289
commit
7e25be92b7
@ -1,4 +1,4 @@
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
name = "environment";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ nequissimus ];
|
||||
@ -20,16 +20,17 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||
};
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
$machine->succeed('[ -L "/etc/plainFile" ]');
|
||||
$machine->succeed('cat "/etc/plainFile" | grep "Hello World"');
|
||||
$machine->succeed('[ -d "/etc/folder" ]');
|
||||
$machine->succeed('[ -d "/etc/folder/with" ]');
|
||||
$machine->succeed('[ -L "/etc/folder/with/file" ]');
|
||||
$machine->succeed('cat "/etc/plainFile" | grep "Hello World"');
|
||||
testScript = ''
|
||||
machine.succeed('[ -L "/etc/plainFile" ]')
|
||||
assert "Hello World" in machine.succeed('cat "/etc/plainFile"')
|
||||
machine.succeed('[ -d "/etc/folder" ]')
|
||||
machine.succeed('[ -d "/etc/folder/with" ]')
|
||||
machine.succeed('[ -L "/etc/folder/with/file" ]')
|
||||
assert "Hello World" in machine.succeed('cat "/etc/plainFile"')
|
||||
|
||||
$machine->succeed('echo ''${TERMINFO_DIRS} | grep "/run/current-system/sw/share/terminfo"');
|
||||
$machine->succeed('echo ''${NIXCON} | grep "awesome"');
|
||||
'';
|
||||
assert "/run/current-system/sw/share/terminfo" in machine.succeed(
|
||||
"echo ''${TERMINFO_DIRS}"
|
||||
)
|
||||
assert "awesome" in machine.succeed("echo ''${NIXCON}")
|
||||
'';
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user