about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorAndreas Rammhold <andreas@rammhold.de>2024-05-12 21:16:26 +0200
committerGitHub <noreply@github.com>2024-05-12 21:16:26 +0200
commitd157db3480233428b1d51b99f964df902a3e2cc3 (patch)
tree3ae8a57e1305bd9705f5c753073ee64f3382c3a5 /nixos/tests
parent16be020e24645e3f17f4591f3e0db71f6e94c020 (diff)
parente83b8cfd4337c15098b0b00884f217414771af50 (diff)
Merge pull request #307051 from hax404/modules/tayga/mappings
nixos/tayga: add mappings option
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/tayga.nix19
1 files changed, 16 insertions, 3 deletions
diff --git a/nixos/tests/tayga.nix b/nixos/tests/tayga.nix
index 4aade67d74d0d..204391d1312f2 100644
--- a/nixos/tests/tayga.nix
+++ b/nixos/tests/tayga.nix
@@ -59,6 +59,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }:
           ];
         };
       };
+      programs.mtr.enable = true;
     };
 
     # The router is configured with static IPv4 addresses towards the server
@@ -120,6 +121,9 @@ import ./make-test-python.nix ({ pkgs, lib, ... }:
             prefixLength = 96;
           };
         };
+        mappings = {
+          "192.0.2.42" = "2001:db8::2";
+        };
       };
     };
 
@@ -171,6 +175,9 @@ import ./make-test-python.nix ({ pkgs, lib, ... }:
             prefixLength = 96;
           };
         };
+        mappings = {
+          "192.0.2.42" = "2001:db8::2";
+        };
       };
     };
 
@@ -199,7 +206,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }:
           ];
         };
       };
-      environment.systemPackages = [ pkgs.mtr ];
+      programs.mtr.enable = true;
     };
   };
 
@@ -225,10 +232,16 @@ import ./make-test-python.nix ({ pkgs, lib, ... }:
       with subtest("Wait for tayga"):
         router.wait_for_unit("tayga.service")
 
-      with subtest("Test ICMP"):
+      with subtest("Test ICMP server -> client"):
+        server.wait_until_succeeds("ping -c 3 192.0.2.42 >&2")
+
+      with subtest("Test ICMP and show a traceroute server -> client"):
+        server.wait_until_succeeds("mtr --show-ips --report-wide 192.0.2.42 >&2")
+
+      with subtest("Test ICMP client -> server"):
         client.wait_until_succeeds("ping -c 3 64:ff9b::100.64.0.2 >&2")
 
-      with subtest("Test ICMP and show a traceroute"):
+      with subtest("Test ICMP and show a traceroute client -> server"):
         client.wait_until_succeeds("mtr --show-ips --report-wide 64:ff9b::100.64.0.2 >&2")
 
       router.log(router.execute("systemd-analyze security tayga.service")[1])