From 60781d9b2d23f1ca8c18d7d0582e5a2a54d32932 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Sun, 3 Dec 2023 00:50:53 +0100 Subject: [PATCH] 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. --- nixos/tests/kubo/kubo.nix | 7 +++++++ 1 file changed, 7 insertions(+) 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/")