about summary refs log tree commit diff
path: root/nixos/tests/transfer-sh.nix
diff options
context:
space:
mode:
authorocfox <i@ocfox.me>2024-01-25 12:23:53 +0800
committerocfox <i@ocfox.me>2024-01-29 00:44:36 +0800
commit2e4d7b7ad23ce9e95d828fe02d9ef5be3dd9e7be (patch)
tree50279e6dea189b7b39b2011afe05a0dd16f83602 /nixos/tests/transfer-sh.nix
parent01e674ba9038a1943d6227468501eef08735ead2 (diff)
nixosTests.transfer-sh: init
Diffstat (limited to 'nixos/tests/transfer-sh.nix')
-rw-r--r--nixos/tests/transfer-sh.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/nixos/tests/transfer-sh.nix b/nixos/tests/transfer-sh.nix
new file mode 100644
index 0000000000000..f4ab7d28858e1
--- /dev/null
+++ b/nixos/tests/transfer-sh.nix
@@ -0,0 +1,20 @@
+import ./make-test-python.nix ({ pkgs, lib, ... }: {
+  name = "transfer-sh";
+
+  meta = {
+    maintainers = with lib.maintainers; [ ocfox ];
+  };
+
+  nodes.machine = { pkgs, ... }: {
+    services.transfer-sh = {
+      enable = true;
+      settings.LISTENER = ":1234";
+    };
+  };
+
+  testScript = ''
+    machine.wait_for_unit("transfer-sh.service")
+    machine.wait_for_open_port(1234)
+    machine.succeed("curl --fail http://localhost:1234/")
+  '';
+})