3
0
Fork 0
forked from mirrors/nixpkgs

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.
This commit is contained in:
Luflosi 2023-12-03 00:50:53 +01:00
parent 82c73a8d72
commit 60781d9b2d
No known key found for this signature in database
GPG key ID: 4E41E29EDCC345D0

View file

@ -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/")