about summary refs log tree commit diff
path: root/nixpkgs/nixos/tests/nixos-test-driver/timeout.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/tests/nixos-test-driver/timeout.nix')
-rw-r--r--nixpkgs/nixos/tests/nixos-test-driver/timeout.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/nixpkgs/nixos/tests/nixos-test-driver/timeout.nix b/nixpkgs/nixos/tests/nixos-test-driver/timeout.nix
new file mode 100644
index 000000000000..29bd85d2498e
--- /dev/null
+++ b/nixpkgs/nixos/tests/nixos-test-driver/timeout.nix
@@ -0,0 +1,15 @@
+{
+  name = "Test that sleep of 6 seconds fails a timeout of 5 seconds";
+  globalTimeout = 5;
+
+  nodes = {
+    machine = ({ pkgs, ... }: {
+    });
+  };
+
+  testScript = ''
+    start_all()
+    machine.wait_for_unit("multi-user.target")
+    machine.succeed("sleep 6")
+  '';
+}