diff options
-rw-r--r-- | flake.nix | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/flake.nix b/flake.nix index 4366190..18d9751 100644 --- a/flake.nix +++ b/flake.nix @@ -240,20 +240,18 @@ }; testScript = '' - kittybox.start() - kittybox.wait_for_unit("default.target") with subtest("Verify that Kittybox started correctly..."): + kittybox.wait_for_open_port(8080) kittybox.succeed("curl --silent http://localhost:8080/micropub") with subtest("Onboarding should correctly work..."): + kittybox.copy_from_host("${./onboarding.json}", "/root/onboarding.json") # Here we rely on a fact that the /nix/store is shared between the host and the VM - kittybox.succeed("curl -vvv http://localhost:8080/ -d${./onboarding.json}") + kittybox.succeed("curl -vvv http://localhost:8080/ -d@/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'") ''; })) - # This test is broken! For some reason the file locks don't seem to work and hang the executable instead. - #.overrideAttrs(o: { meta.broken = true; }) ; }; |