diff options
author | Jacek Galowicz <jacek.galowicz@cyberus-technology.de> | 2019-11-25 21:57:46 +0100 |
---|---|---|
committer | Jacek Galowicz <jacek.galowicz@cyberus-technology.de> | 2019-11-25 21:57:46 +0100 |
commit | e4abed35be788f7c77e67209c3a68c4b6ce70e71 (patch) | |
tree | 5b458813f5ea721883db35056d3fd10d9d40a5bf /nixos/tests/containers-hosts.nix | |
parent | acb53c777c40a8c475dc5368236b44e53171d238 (diff) | |
download | nixpkgs-e4abed35be788f7c77e67209c3a68c4b6ce70e71.tar nixpkgs-e4abed35be788f7c77e67209c3a68c4b6ce70e71.tar.gz nixpkgs-e4abed35be788f7c77e67209c3a68c4b6ce70e71.tar.bz2 nixpkgs-e4abed35be788f7c77e67209c3a68c4b6ce70e71.tar.lz nixpkgs-e4abed35be788f7c77e67209c3a68c4b6ce70e71.tar.xz nixpkgs-e4abed35be788f7c77e67209c3a68c4b6ce70e71.tar.zst nixpkgs-e4abed35be788f7c77e67209c3a68c4b6ce70e71.zip |
nixos/containers-hosts: Port test to python
Diffstat (limited to 'nixos/tests/containers-hosts.nix')
-rw-r--r-- | nixos/tests/containers-hosts.nix | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nixos/tests/containers-hosts.nix b/nixos/tests/containers-hosts.nix index 8cf298c6225..d6fb4a761ee 100644 --- a/nixos/tests/containers-hosts.nix +++ b/nixos/tests/containers-hosts.nix @@ -1,6 +1,6 @@ # Test for NixOS' container support. -import ./make-test.nix ({ pkgs, ...} : { +import ./make-test-python.nix ({ pkgs, ...} : { name = "containers-hosts"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ montag451 ]; @@ -42,11 +42,11 @@ import ./make-test.nix ({ pkgs, ...} : { }; testScript = '' - startAll; - $machine->waitForUnit("default.target"); + start_all() + machine.wait_for_unit("default.target") - # Ping the containers using the entries added in /etc/hosts - $machine->succeed("ping -n -c 1 simple.containers"); - $machine->succeed("ping -n -c 1 netmask.containers"); + with subtest("Ping the containers using the entries added in /etc/hosts"): + for host in "simple.containers", "netmask.containers": + machine.succeed(f"ping -n -c 1 {host}") ''; }) |