diff options
author | aszlig <aszlig@redmoonstudios.org> | 2015-03-18 12:41:53 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2015-03-18 12:41:53 +0100 |
commit | f01f598916283c6d66232ecd7a93097c5c118932 (patch) | |
tree | fefe5fbc7578a55af9c8c3d2c84640e6324661a7 /tests/heinrich.nix | |
parent | b73d9004052a90647647475ee46884b445e1f534 (diff) |
tests: Integrate heinrich VM test from labernix.
Using "import ../machines" is a bit ugly here, so we might want to integrate this into make-test.nix, but other than that it should work nevertheless. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'tests/heinrich.nix')
-rw-r--r-- | tests/heinrich.nix | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/heinrich.nix b/tests/heinrich.nix new file mode 100644 index 00000000..af64b844 --- /dev/null +++ b/tests/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"); + ''; +} |