diff options
author | Max <max@privatevoid.net> | 2022-04-16 21:14:26 +0200 |
---|---|---|
committer | Max <max@privatevoid.net> | 2022-04-16 21:15:09 +0200 |
commit | 699e389f8343fb14f7ca3bda09e8871c705c9dde (patch) | |
tree | 44dfcf78d5efad93f630a293c96dd39b99adc988 | |
parent | 72d6d73e3750b6ec4dfffeb05eb0688d6358aeab (diff) | |
download | nixpkgs-699e389f8343fb14f7ca3bda09e8871c705c9dde.tar nixpkgs-699e389f8343fb14f7ca3bda09e8871c705c9dde.tar.gz nixpkgs-699e389f8343fb14f7ca3bda09e8871c705c9dde.tar.bz2 nixpkgs-699e389f8343fb14f7ca3bda09e8871c705c9dde.tar.lz nixpkgs-699e389f8343fb14f7ca3bda09e8871c705c9dde.tar.xz nixpkgs-699e389f8343fb14f7ca3bda09e8871c705c9dde.tar.zst nixpkgs-699e389f8343fb14f7ca3bda09e8871c705c9dde.zip |
nixos/ipfs: test FUSE mount
-rw-r--r-- | nixos/tests/ipfs.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/nixos/tests/ipfs.nix b/nixos/tests/ipfs.nix index 5e7c967028e..1fd0ef9d8bd 100644 --- a/nixos/tests/ipfs.nix +++ b/nixos/tests/ipfs.nix @@ -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") ''; }) |