diff options
author | aszlig <aszlig@redmoonstudios.org> | 2015-03-11 02:32:19 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2015-03-11 02:35:34 +0100 |
commit | cac8969fc2e8419901e01c5aed8ad663691ed088 (patch) | |
tree | 20bc9a25f2361b32ac21f85760c264df5cca09ec /tests/heinrich.nix | |
parent | 9329d8d031328f880dd4cbab511ed1a1a89ffae7 (diff) |
Add preliminary VM test for heinrich.
Currently, this one is unfinished and I was working on it while I've been at the Lab and don't have a clue right now where I left off. But it's still a good idea to add it here, so someone[TM] can finish it someday. 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..6a424c21 --- /dev/null +++ b/tests/heinrich.nix @@ -0,0 +1,51 @@ +import <nixpkgs/nixos/tests/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 ../machines/heinrich.nix ]; + 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"); + ''; +} |