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.

Luflosi 60781d9b 82c73a8d

Changed files
+7
nixos
tests
kubo
+7
nixos/tests/kubo/kubo.nix
···
f"ipfs --api /unix/run/ipfs.sock cat /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/")
···
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/")