diff options
author | Martin Bornhold <mb@bo-tech.de> | 2017-11-16 14:54:13 +0100 |
---|---|---|
committer | Martin Bornhold <mb@bo-tech.de> | 2017-11-16 20:25:45 +0100 |
commit | 25b71e18f50ed951ada5ad63e32f25d990abec5e (patch) | |
tree | c422ff036ee131ac45f7cb3d5972cf6574369929 /nixos/tests/containers-bridge.nix | |
parent | ac7edeebfd4ca45d4c6569f36dc5d6dd10aa58e9 (diff) | |
download | nixpkgs-25b71e18f50ed951ada5ad63e32f25d990abec5e.tar nixpkgs-25b71e18f50ed951ada5ad63e32f25d990abec5e.tar.gz nixpkgs-25b71e18f50ed951ada5ad63e32f25d990abec5e.tar.bz2 nixpkgs-25b71e18f50ed951ada5ad63e32f25d990abec5e.tar.lz nixpkgs-25b71e18f50ed951ada5ad63e32f25d990abec5e.tar.xz nixpkgs-25b71e18f50ed951ada5ad63e32f25d990abec5e.tar.zst nixpkgs-25b71e18f50ed951ada5ad63e32f25d990abec5e.zip |
nixos-container: Modify existing test to cover show-ip command
Modified the existing test to check that the 'nixos-container show-ip' command can handle ipv4 addresses with submask in CIDR notation.
Diffstat (limited to 'nixos/tests/containers-bridge.nix')
-rw-r--r-- | nixos/tests/containers-bridge.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nixos/tests/containers-bridge.nix b/nixos/tests/containers-bridge.nix index 598abd22e61..b8d4759684c 100644 --- a/nixos/tests/containers-bridge.nix +++ b/nixos/tests/containers-bridge.nix @@ -69,6 +69,12 @@ import ./make-test.nix ({ pkgs, ...} : { $machine->succeed("ping -n -c 1 $ip6"); $machine->succeed("curl --fail http://[$ip6]/ > /dev/null"); + # Check that nixos-container show-ip works in case of an ipv4 address with + # subnetmask in CIDR notation. + my $result = $machine->succeed("nixos-container show-ip webserver"); + chomp $result; + $result eq $ip or die; + # Stop the container. $machine->succeed("nixos-container stop webserver"); $machine->fail("curl --fail --connect-timeout 2 http://$ip/ > /dev/null"); |