diff options
author | aszlig <aszlig@redmoonstudios.org> | 2015-03-18 14:42:41 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2015-03-18 14:42:41 +0100 |
commit | 903106efb392dc6235dd02523c29b3fbfed37462 (patch) | |
tree | 633dffbc29ec74863c592dbf51cd46950a0cc2c1 /tests/labnet/heinrich.nix | |
parent | be4dbbc339433d0de03f801c1c1223b1cd26330d (diff) |
tests: Properly namespace the VM tests.
We're going to write much more tests and don't want to clutter up the tests/ directory. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'tests/labnet/heinrich.nix')
-rw-r--r-- | tests/labnet/heinrich.nix | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/labnet/heinrich.nix b/tests/labnet/heinrich.nix new file mode 100644 index 00000000..cacf4267 --- /dev/null +++ b/tests/labnet/heinrich.nix @@ -0,0 +1,51 @@ +import ../make-test.nix { + name = "heinrich"; + + nodes = let + common = { lib, ... }: { + networking.useNetworkd = true; + systemd.network.netdevs."40-eth0".netdevConfig = { + Name = "eth0"; + Kind = "dummy"; + }; + }; + in { + heinrich = { + imports = [ common (import ../machines {}).labnet.heinrich.config ]; + virtualisation.vlans = [ 1 8 14 ]; + heinrich.internalInterface = "eth1"; + heinrich.externalInterface = "eth2"; + }; + hotelturm = { lib, ... }: { + imports = [ common ]; + virtualisation.vlans = [ 8 ]; + networking.useDHCP = false; + networking.interfaces.eth1.ip4 = lib.singleton { + address = "10.11.77.16"; + prefixLength = 24; + }; + }; + moritz = { lib, ... }: { + imports = [ common ]; + virtualisation.vlans = [ 14 ]; + networking.useDHCP = false; + networking.interfaces.eth1.ip4 = lib.singleton { + address = "192.168.0.1"; + prefixLength = 24; + }; + }; + client = { + imports = [ common ]; + virtualisation.vlans = [ 1 ]; + }; + }; + + testScript = '' + startAll; + $heinrich->waitForUnit("dnsmasq.service"); + $client->waitForUnit("network-interfaces.target"); + $client->waitForUnit("network.target"); + + $client->succeed("ip addr >&2"); + ''; +} |