1{ pkgs, ... }:
2{
3 name = "grav";
4
5 nodes = {
6 machine =
7 { pkgs, ... }:
8 {
9 services.grav.enable = true;
10 };
11 };
12
13 testScript = ''
14 start_all()
15 machine.wait_for_unit("phpfpm-grav.service")
16 machine.wait_for_open_port(80)
17
18 # The first request to a fresh install should result in a redirect to the
19 # admin page, where the user is expected to set up an admin user.
20 actual = machine.succeed("curl -v --stderr - http://localhost/", timeout=10).splitlines()
21 expected = "< Location: /admin"
22 assert expected in actual, \
23 f"unexpected reply from Grav: '{actual}'"
24 '';
25}