about summary refs log tree commit diff
path: root/nixos/tests/hocker-fetchdocker/default.nix
diff options
context:
space:
mode:
authorParnell Springmeyer <parnell@digitalmentat.com>2017-12-01 21:06:16 -0600
committerParnell Springmeyer <parnell@digitalmentat.com>2017-12-01 21:06:16 -0600
commitc1eb962516abb1ab7900d1f19f423f3a4318b849 (patch)
tree4d4615478cbd897c3648865ed68c47c1f3a60412 /nixos/tests/hocker-fetchdocker/default.nix
parent25865688a729d15dbb2dc21ebd9fbf74e2cffc4b (diff)
downloadnixlib-c1eb962516abb1ab7900d1f19f423f3a4318b849.tar
nixlib-c1eb962516abb1ab7900d1f19f423f3a4318b849.tar.gz
nixlib-c1eb962516abb1ab7900d1f19f423f3a4318b849.tar.bz2
nixlib-c1eb962516abb1ab7900d1f19f423f3a4318b849.tar.lz
nixlib-c1eb962516abb1ab7900d1f19f423f3a4318b849.tar.xz
nixlib-c1eb962516abb1ab7900d1f19f423f3a4318b849.tar.zst
nixlib-c1eb962516abb1ab7900d1f19f423f3a4318b849.zip
fetchdocker: Integration test exercising hocker and fetchdocker
This change adds a simple integration test exercising the fetchdocker
Nix code and hocker utilities for the simple `hello-world` docker
container. We exercise:

- Fetching the docker image configuration json
- Fetching the docker image layers
- Building a compositor script
- Loading the `hello-world` docker image into docker using the
  compositor script and `docker load`
- Running that loaded container
Diffstat (limited to 'nixos/tests/hocker-fetchdocker/default.nix')
-rw-r--r--nixos/tests/hocker-fetchdocker/default.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/nixos/tests/hocker-fetchdocker/default.nix b/nixos/tests/hocker-fetchdocker/default.nix
new file mode 100644
index 000000000000..4f30f01e4032
--- /dev/null
+++ b/nixos/tests/hocker-fetchdocker/default.nix
@@ -0,0 +1,15 @@
+import ../make-test.nix ({ pkgs, ...} : {
+  name = "test-hocker-fetchdocker";
+  meta = with pkgs.stdenv.lib.maintainers; {
+    maintainers = [ ixmatus ];
+  };
+
+  machine = import ./machine.nix;
+
+  testScript = ''
+    startAll;
+
+    $machine->waitForUnit("sockets.target");
+    $machine->waitUntilSucceeds("docker run registry-1.docker.io/v2/library/hello-world:latest");
+  '';
+})