diff options
author | rnhmjoj <rnhmjoj@inventati.org> | 2023-06-18 02:59:06 +0200 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-06-20 01:12:04 +0000 |
commit | 623d7d2124465e60a3f39f96e0299fa4c3c7b055 (patch) | |
tree | 596a11ba7420a192adf938f0f238ee7ba1304e49 /nixos | |
parent | 7d263715bdf3b05bc58b9ed4d5bea9b075ff0c70 (diff) | |
download | nixpkgs-623d7d2124465e60a3f39f96e0299fa4c3c7b055.tar nixpkgs-623d7d2124465e60a3f39f96e0299fa4c3c7b055.tar.gz nixpkgs-623d7d2124465e60a3f39f96e0299fa4c3c7b055.tar.bz2 nixpkgs-623d7d2124465e60a3f39f96e0299fa4c3c7b055.tar.lz nixpkgs-623d7d2124465e60a3f39f96e0299fa4c3c7b055.tar.xz nixpkgs-623d7d2124465e60a3f39f96e0299fa4c3c7b055.tar.zst nixpkgs-623d7d2124465e60a3f39f96e0299fa4c3c7b055.zip |
nixos/tests/fakeroute: init
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/fakeroute.nix | 22 |
2 files changed, 23 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 5e846fc83d1..9a7f6807ffd 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -253,6 +253,7 @@ in { etebase-server = handleTest ./etebase-server.nix {}; etesync-dav = handleTest ./etesync-dav.nix {}; evcc = handleTest ./evcc.nix {}; + fakeroute = handleTest ./fakeroute.nix {}; fancontrol = handleTest ./fancontrol.nix {}; fcitx5 = handleTest ./fcitx5 {}; fenics = handleTest ./fenics.nix {}; diff --git a/nixos/tests/fakeroute.nix b/nixos/tests/fakeroute.nix new file mode 100644 index 00000000000..37b174524ab --- /dev/null +++ b/nixos/tests/fakeroute.nix @@ -0,0 +1,22 @@ +import ./make-test-python.nix ({ lib, pkgs, ...} : { + name = "fakeroute"; + meta.maintainers = with lib.maintainers; [ rnhmjoj ]; + + nodes.machine = { ... }: { + imports = [ ../modules/profiles/minimal.nix ]; + services.fakeroute.enable = true; + services.fakeroute.route = + [ "216.102.187.130" "4.0.1.122" + "198.116.142.34" "63.199.8.242" + ]; + environment.systemPackages = [ pkgs.traceroute ]; + }; + + testScript = + '' + start_all() + machine.wait_for_unit("fakeroute.service") + machine.succeed("traceroute 127.0.0.1 | grep -q 216.102.187.130") + ''; +}) + |