about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2021-12-31 09:02:02 +0300
committerVika <vika@fireburn.ru>2021-12-31 09:02:02 +0300
commit287449b98ccd1a223ef2b1668eca4c0d5e52ad50 (patch)
tree44030b0cfa54a44eb259d1453b35f0ace2b08361
parenta9f88a35c0f49579ce7e6da855b834d2975b1bf0 (diff)
flake: fix e2e tests
-rw-r--r--flake.nix8
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; })
       ;
     };