nixos/ipfs: test FUSE mount
This commit is contained in:
parent
72d6d73e37
commit
699e389f83
1 changed files with 15 additions and 0 deletions
|
@ -14,6 +14,14 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
|||
};
|
||||
};
|
||||
|
||||
nodes.fuse = { ... }: {
|
||||
services.ipfs = {
|
||||
enable = true;
|
||||
apiAddress = "/ip4/127.0.0.1/tcp/2324";
|
||||
autoMount = true;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
|
||||
|
@ -40,5 +48,12 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
|||
# Test if setting dataDir works properly with the hardened systemd unit
|
||||
machine.succeed("test -e /mnt/ipfs/config")
|
||||
machine.succeed("test ! -e /var/lib/ipfs/")
|
||||
|
||||
# Test FUSE mountpoint
|
||||
ipfs_hash = fuse.succeed(
|
||||
"echo fnord3 | ipfs --api /ip4/127.0.0.1/tcp/2324 add | awk '{ print $2 }'"
|
||||
)
|
||||
|
||||
fuse.succeed(f"cat /ipfs/{ipfs_hash.strip()} | grep fnord3")
|
||||
'';
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue