diff --git a/nixos/tests/kubo.nix b/nixos/tests/kubo.nix index 9fba5e2d1f3c..3ea7c894ab3a 100644 --- a/nixos/tests/kubo.nix +++ b/nixos/tests/kubo.nix @@ -55,8 +55,15 @@ import ./make-test-python.nix ({ pkgs, ...} : { # Workaround: using CID Version 1 avoids that. ipfs_hash = fuse.succeed( "echo fnord3 | ipfs --api /ip4/127.0.0.1/tcp/2324 add --quieter --cid-version=1" - ) + ).strip() - fuse.succeed(f"cat /ipfs/{ipfs_hash.strip()} | grep fnord3") + fuse.succeed(f"cat /ipfs/{ipfs_hash} | grep fnord3") + + # Force Kubo to crash and wait for it to restart + # Tests the unmounting of /ipns and /ipfs + fuse.systemctl("kill --signal=SIGKILL ipfs.service") + fuse.wait_for_unit("ipfs.service", timeout = 30) + + fuse.succeed(f"cat /ipfs/{ipfs_hash} | grep fnord3") ''; })