nixos/containers-hosts: Port test to python
This commit is contained in:
parent
acb53c777c
commit
e4abed35be
|
@ -1,6 +1,6 @@
|
||||||
# Test for NixOS' container support.
|
# Test for NixOS' container support.
|
||||||
|
|
||||||
import ./make-test.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "containers-hosts";
|
name = "containers-hosts";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ montag451 ];
|
maintainers = [ montag451 ];
|
||||||
|
@ -42,11 +42,11 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
startAll;
|
start_all()
|
||||||
$machine->waitForUnit("default.target");
|
machine.wait_for_unit("default.target")
|
||||||
|
|
||||||
# Ping the containers using the entries added in /etc/hosts
|
with subtest("Ping the containers using the entries added in /etc/hosts"):
|
||||||
$machine->succeed("ping -n -c 1 simple.containers");
|
for host in "simple.containers", "netmask.containers":
|
||||||
$machine->succeed("ping -n -c 1 netmask.containers");
|
machine.succeed(f"ping -n -c 1 {host}")
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user