diff options
author | Karmanyaah Malhotra <karmanyaah.git@malhotra.cc> | 2023-02-05 18:35:29 -0600 |
---|---|---|
committer | Karmanyaah Malhotra <karmanyaah.git@malhotra.cc> | 2023-04-13 03:14:59 -0500 |
commit | 5fb09c9e3a88dd9c291ea6aeab3b63923d325d6a (patch) | |
tree | efd9ab18713635c5fa5bbe6365df7e66853b45c4 /nixos/tests | |
parent | 4bd622cd9d17d3fe2dedbc2adcb1eb45ecbff805 (diff) |
nixos/kubo: Test Kubo restart after a crash
Move strip() to definition Co-authored-by: Luflosi <Luflosi@users.noreply.github.com>
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/kubo.nix | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/nixos/tests/kubo.nix b/nixos/tests/kubo.nix index 9fba5e2d1f3cf..3ea7c894ab3a1 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} | 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.strip()} | grep fnord3") + fuse.succeed(f"cat /ipfs/{ipfs_hash} | grep fnord3") ''; }) |