Skip to content

Commit

Permalink
Merge pull request #73699 from NinjaTrappeur/wg-test-python
Browse files Browse the repository at this point in the history
tests/systemd-networkd-wireguard: migrate to python test runner
  • Loading branch information
flokli committed Nov 22, 2019
2 parents 8960509 + fe12d5d commit 0b0da4c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions nixos/tests/systemd-networkd-wireguard.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ let generateNodeConf = { lib, pkgs, config, privkpath, pubk, peerId, nodeId, ...
};
};
};
in import ./make-test.nix ({pkgs, ... }: {
in import ./make-test-python.nix ({pkgs, ... }: {
name = "networkd-wireguard";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ ninjatrappeur ];
Expand All @@ -70,12 +70,12 @@ in import ./make-test.nix ({pkgs, ... }: {
in generateNodeConf (attrs // localConf);
};
testScript = ''
startAll;
$node1->waitForUnit('systemd-networkd-wait-online.service');
$node2->waitForUnit('systemd-networkd-wait-online.service');
$node1->succeed('ping -c 5 10.0.0.2');
$node2->succeed('ping -c 5 10.0.0.1');
start_all()
node1.wait_for_unit("systemd-networkd-wait-online.service")
node2.wait_for_unit("systemd-networkd-wait-online.service")
node1.succeed("ping -c 5 10.0.0.2")
node2.succeed("ping -c 5 10.0.0.1")
# Is the fwmark set?
$node2->succeed('wg | grep -q 42');
node2.succeed("wg | grep -q 42")
'';
})

0 comments on commit 0b0da4c

Please sign in to comment.