about summary refs log tree commit diff
path: root/smoke-test.nix
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2022-05-28 21:05:19 +0300
committerVika <vika@fireburn.ru>2022-06-02 20:59:45 +0300
commit558c4078fd6b5c10bfbcac826774335904807e39 (patch)
treeaab6adef0954241132d556466a40d0066e6d60ed /smoke-test.nix
parentee5b6dca7147c905a79447963761e7cd1f38cabc (diff)
downloadkittybox-558c4078fd6b5c10bfbcac826774335904807e39.tar.zst
feat: group endpoints under `.kittybox`
Actually got the idea from https://xeiaso.net/, who groups xer
website's endpoints under the `.within` folder.
Diffstat (limited to 'smoke-test.nix')
-rw-r--r--smoke-test.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/smoke-test.nix b/smoke-test.nix
index fbbc8a7..3965e7b 100644
--- a/smoke-test.nix
+++ b/smoke-test.nix
@@ -17,7 +17,7 @@ kittybox:
       };
 
       environment.systemPackages = with pkgs; [
-        curl
+        xh
       ];
     };
   };
@@ -25,12 +25,12 @@ kittybox:
   testScript = ''
     with subtest("Verify that Kittybox started correctly..."):
         kittybox.wait_for_open_port(8080)
-        kittybox.succeed("curl --silent http://localhost:8080/micropub")
+        kittybox.succeed("xh --no-check-status http://localhost:8080/.kittybox/micropub")
 
     with subtest("Onboarding should correctly work..."):
         kittybox.copy_from_host("${./onboarding.json}", "/root/onboarding.json")
-        kittybox.succeed("curl -vvv http://localhost:8080/onboarding -d@/root/onboarding.json -H 'Content-Type: application/json'")
+        kittybox.succeed("xh --follow http://localhost:8080/.kittybox/onboarding -j @/root/onboarding.json")
         # Testing for a known string is the easiest way to determine that the onboarding worked
-        kittybox.succeed("curl --silent http://localhost:8080/ | grep 'vestige of the past long gone'")
+        kittybox.succeed("xh http://localhost:8080/ | grep 'vestige of the past long gone'")
 '';
 }