lol

nixosTests.haste-server: init

+24
+1
nixos/tests/all-tests.nix
··· 193 193 hadoop.hdfs = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./hadoop/hdfs.nix {}; 194 194 hadoop.yarn = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./hadoop/yarn.nix {}; 195 195 haka = handleTest ./haka.nix {}; 196 + haste-server = handleTest ./haste-server.nix {}; 196 197 haproxy = handleTest ./haproxy.nix {}; 197 198 hardened = handleTest ./hardened.nix {}; 198 199 hedgedoc = handleTest ./hedgedoc.nix {};
+23
nixos/tests/haste-server.nix
··· 1 + import ./make-test-python.nix ({ pkgs, lib, ... }: 2 + { 3 + name = "haste-server"; 4 + meta.maintainers = with lib.maintainers; [ mkg20001 ]; 5 + 6 + nodes.machine = { pkgs, ... }: { 7 + environment.systemPackages = with pkgs; [ 8 + curl 9 + jq 10 + ]; 11 + 12 + services.haste-server = { 13 + enable = true; 14 + }; 15 + }; 16 + 17 + testScript = '' 18 + machine.wait_for_unit("haste-server") 19 + machine.wait_until_succeeds("curl -s localhost:7777") 20 + machine.succeed('curl -s -X POST http://localhost:7777/documents -d "Hello World!" > bla') 21 + machine.succeed('curl http://localhost:7777/raw/$(cat bla | jq -r .key) | grep "Hello World"') 22 + ''; 23 + })