1 import ./make-test-python.nix ({ pkgs, ...} :
5 meta = with pkgs.lib.maintainers; {
6 maintainers = [ litchipi ];
17 system.activationScripts.ifm-setup-dir = ''
18 mkdir -p ${services.ifm.dataDir}
19 chmod u+w,g+w,o+w ${services.ifm.dataDir}
26 server.wait_for_unit("ifm.service")
27 server.wait_for_open_port(9001)
28 server.succeed("curl --fail http://localhost:9001")
30 server.succeed("echo \"testfile\" > testfile && shasum testfile >> checksums")
31 server.succeed("curl --fail http://localhost:9001 -X POST -F \"api=upload\" -F \"dir=\" -F \"file=@testfile\" | grep \"OK\"");
32 server.succeed("rm testfile")
33 server.succeed("curl --fail http://localhost:9001 -X POST -F \"api=download\" -F \"filename=testfile\" -F \"dir=\" --output testfile");
34 server.succeed("shasum testfile >> checksums && shasum --check checksums")