about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorLuflosi <luflosi@luflosi.de>2023-12-03 00:50:53 +0100
committerLuflosi <luflosi@luflosi.de>2023-12-14 23:19:34 +0100
commit60781d9b2d23f1ca8c18d7d0582e5a2a54d32932 (patch)
tree05d7b2fc641bff161f726950df919794554bed0c /nixos
parent82c73a8d726d7f8e13276f0303655257d0e0fa58 (diff)
downloadnixlib-60781d9b2d23f1ca8c18d7d0582e5a2a54d32932.tar
nixlib-60781d9b2d23f1ca8c18d7d0582e5a2a54d32932.tar.gz
nixlib-60781d9b2d23f1ca8c18d7d0582e5a2a54d32932.tar.bz2
nixlib-60781d9b2d23f1ca8c18d7d0582e5a2a54d32932.tar.lz
nixlib-60781d9b2d23f1ca8c18d7d0582e5a2a54d32932.tar.xz
nixlib-60781d9b2d23f1ca8c18d7d0582e5a2a54d32932.tar.zst
nixlib-60781d9b2d23f1ca8c18d7d0582e5a2a54d32932.zip
nixos/tests/kubo: test socket activation for the Gateway
Add a new test to check that accessing the Gateway socket also starts the daemon via socket activation.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/kubo/kubo.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/nixos/tests/kubo/kubo.nix b/nixos/tests/kubo/kubo.nix
index 7965ad277385..b8222c652b33 100644
--- a/nixos/tests/kubo/kubo.nix
+++ b/nixos/tests/kubo/kubo.nix
@@ -46,6 +46,13 @@
             f"ipfs --api /unix/run/ipfs.sock cat /ipfs/{ipfs_hash.strip()} | grep fnord2"
         )
 
+    machine.stop_job("ipfs")
+
+    with subtest("Socket activation for the Gateway"):
+        machine.succeed(
+            f"curl 'http://127.0.0.1:8080/ipfs/{ipfs_hash.strip()}' | grep fnord2"
+        )
+
     with subtest("Setting dataDir works properly with the hardened systemd unit"):
         machine.succeed("test -e /mnt/ipfs/config")
         machine.succeed("test ! -e /var/lib/ipfs/")