mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
nixos/tests/fakeroute: init
This commit is contained in:
parent
7d263715bd
commit
623d7d2124
@ -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 {};
|
||||
|
22
nixos/tests/fakeroute.nix
Normal file
22
nixos/tests/fakeroute.nix
Normal file
@ -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")
|
||||
'';
|
||||
})
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchurl }:
|
||||
{ lib, stdenv, fetchurl, nixosTests }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fakeroute";
|
||||
@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-DoXGJm8vOlAD6ZuvVAt6bkgfahc8WgyYIXCrgqzfiWg=";
|
||||
};
|
||||
|
||||
passthru.tests.fakeroute = nixosTests.fakeroute;
|
||||
|
||||
meta = with lib; {
|
||||
description = ''
|
||||
Make your machine appears to be anywhere on the internet in a traceroute
|
||||
|
Loading…
Reference in New Issue
Block a user