summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2017-11-17 00:32:56 +0000
committerGitHub <noreply@github.com>2017-11-17 00:32:56 +0000
commit963204e6eef211f452d4ed45e40269d720d19ba4 (patch)
tree1a09ccbb425fe75d62a71036259f2d8f37da9e95 /nixos/tests
parent202912d6179696bd6d34df42d7f31a93b05c356b (diff)
parent25b71e18f50ed951ada5ad63e32f25d990abec5e (diff)
downloadnixlib-963204e6eef211f452d4ed45e40269d720d19ba4.tar
nixlib-963204e6eef211f452d4ed45e40269d720d19ba4.tar.gz
nixlib-963204e6eef211f452d4ed45e40269d720d19ba4.tar.bz2
nixlib-963204e6eef211f452d4ed45e40269d720d19ba4.tar.lz
nixlib-963204e6eef211f452d4ed45e40269d720d19ba4.tar.xz
nixlib-963204e6eef211f452d4ed45e40269d720d19ba4.tar.zst
nixlib-963204e6eef211f452d4ed45e40269d720d19ba4.zip
Merge pull request #31753 from mbld/show-ip
nixos-container: Make show-ip work together with ipv4 + netmask
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/containers-bridge.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/nixos/tests/containers-bridge.nix b/nixos/tests/containers-bridge.nix
index 598abd22e61b..b8d4759684cc 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");