Commit 5fb09c9e authored by Karmanyaah Malhotra's avatar Karmanyaah Malhotra
Browse files

nixos/kubo: Test Kubo restart after a crash



Move strip() to definition

Co-authored-by: default avatarLuflosi <Luflosi@users.noreply.github.com>
parent 4bd622cd
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -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")
  '';
})