mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-24 06:08:16 +03:00
nixos/kubo: Test Kubo restart after a crash
Move strip() to definition Co-authored-by: Luflosi <Luflosi@users.noreply.github.com>
This commit is contained in:
parent
4bd622cd9d
commit
5fb09c9e3a
@ -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")
|
||||
'';
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user