summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKjetil Orbekk <kjetil.orbekk@gmail.com>2017-05-13 20:23:41 -0400
committerKjetil Orbekk <kjetil.orbekk@gmail.com>2017-05-13 20:23:41 -0400
commitdcab169d6faaafa378428b761633fc1d651dc721 (patch)
treeddf6538a7cea3d9250aef9df355f12306988910e /tests
parenta2c246eed30741b8e89734edfd2905765372f88d (diff)
Add new container, shape.
Diffstat (limited to 'tests')
-rw-r--r--tests/container-shape.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/container-shape.nix b/tests/container-shape.nix
new file mode 100644
index 0000000..441694f
--- /dev/null
+++ b/tests/container-shape.nix
@@ -0,0 +1,24 @@
+let
+ hostIp = "fc00::2";
+ localIp = "fc00::1";
+in
+import <nixpkgs/nixos/tests/make-test.nix> ( { pkgs, ... }: {
+ machine =
+ { config, pkgs, lib, ... }: {
+ containers.shape2 = {
+ privateNetwork = true;
+ hostAddress6 = hostIp;
+ localAddress6 = localIp;
+ config = import ../machines/container-shape.nix {
+ inherit config pkgs lib;
+ };
+ };
+ };
+
+ testScript = ''
+ $machine->waitForUnit("default.target");
+ $machine->succeed("nixos-container list") =~ /shape2/ or die;
+ $machine->succeed("nixos-container start shape2");
+ $machine->succeed("nixos-container run shape2 -- hostname") =~ /shape/ or die;
+ '';
+})