mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
Merge pull request #73699 from NinjaTrappeur/wg-test-python
tests/systemd-networkd-wireguard: migrate to python test runner
This commit is contained in:
commit
0b0da4c944
@ -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 ];
|
||||
@ -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")
|
||||
'';
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user