From 903106efb392dc6235dd02523c29b3fbfed37462 Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 18 Mar 2015 14:42:41 +0100 Subject: 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 --- tests/aszlig/i3.nix | 29 +++++++++++++++++++++++++++ tests/heinrich.nix | 51 ----------------------------------------------- tests/i3.nix | 29 --------------------------- tests/labnet/heinrich.nix | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 80 insertions(+), 80 deletions(-) create mode 100644 tests/aszlig/i3.nix delete mode 100644 tests/heinrich.nix delete mode 100644 tests/i3.nix create mode 100644 tests/labnet/heinrich.nix (limited to 'tests') diff --git a/tests/aszlig/i3.nix b/tests/aszlig/i3.nix new file mode 100644 index 00000000..e90ff0f4 --- /dev/null +++ b/tests/aszlig/i3.nix @@ -0,0 +1,29 @@ +import ../make-test.nix ({ pkgs, ... }: { + name = "i3"; + + machine = { lib, ... }: { + imports = [ ]; + + vuizvui.user.aszlig.profiles.base.enable = true; + vuizvui.user.aszlig.services.i3.enable = true; + + services.xserver.windowManager.default = lib.mkForce "i3"; + /* XXX */ + fonts = { + enableCoreFonts = true; + enableFontDir = true; + enableGhostscriptFonts = true; + fonts = [ + pkgs.dosemu_fonts + pkgs.liberation_ttf + ]; + }; + /* !XXX */ + }; + + testScript = { nodes, ... }: '' + $machine->waitForX; + $machine->sleep(20); + $machine->screenshot("i3"); + ''; +}) diff --git a/tests/heinrich.nix b/tests/heinrich.nix deleted file mode 100644 index af64b844..00000000 --- a/tests/heinrich.nix +++ /dev/null @@ -1,51 +0,0 @@ -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"); - ''; -} diff --git a/tests/i3.nix b/tests/i3.nix deleted file mode 100644 index e0842bc6..00000000 --- a/tests/i3.nix +++ /dev/null @@ -1,29 +0,0 @@ -import ./make-test.nix ({ pkgs, ... }: { - name = "i3"; - - machine = { lib, ... }: { - imports = [ ]; - - vuizvui.user.aszlig.profiles.base.enable = true; - vuizvui.user.aszlig.services.i3.enable = true; - - services.xserver.windowManager.default = lib.mkForce "i3"; - /* XXX */ - fonts = { - enableCoreFonts = true; - enableFontDir = true; - enableGhostscriptFonts = true; - fonts = [ - pkgs.dosemu_fonts - pkgs.liberation_ttf - ]; - }; - /* !XXX */ - }; - - testScript = { nodes, ... }: '' - $machine->waitForX; - $machine->sleep(20); - $machine->screenshot("i3"); - ''; -}) 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"); + ''; +} -- cgit 1.4.1