From 287449b98ccd1a223ef2b1668eca4c0d5e52ad50 Mon Sep 17 00:00:00 2001 From: Vika Date: Fri, 31 Dec 2021 09:02:02 +0300 Subject: flake: fix e2e tests --- flake.nix | 8 +++----- 1 file 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; }) ; }; -- cgit 1.4.1