Skip to content

Commit

Permalink
Rewrite nixosTest script
Browse files Browse the repository at this point in the history
  • Loading branch information
jezen committed Feb 14, 2025
1 parent 1f65684 commit 6b03d89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ cabal.sandbox.config
*.sublime-*
dist-newstyle/
.pre-commit-config.yaml
result
.nixos-test-history
11 changes: 2 additions & 9 deletions vm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,7 @@ testers.nixosTest {
testScript = ''
server.start()
server.wait_for_unit("keter-ng.service")
# Check if something is listening on port 80
server.succeed("ss -tlnp | grep ':80 ' || netstat -tlnp | grep ':80 '")
# Wait for keter to respond (try 127.0.0.1 to avoid IPv6 issues)
server.wait_until_succeeds("curl -fs http://127.0.0.1", timeout=30)
# Show logs if something goes wrong
server.succeed("journalctl -u keter-ng.service --no-pager --lines=50")
server.wait_for_open_port(80)
server.succeed("curl localhost")
'';
}

0 comments on commit 6b03d89

Please sign in to comment.