2021-04-23 19:39:52 +00:00
|
|
|
{ pkgs, testService, processManagers, profiles, nix-processmgmt }:
|
2021-03-25 20:30:24 +00:00
|
|
|
|
|
|
|
testService {
|
2023-09-20 16:36:47 +00:00
|
|
|
name = "apache";
|
2021-03-25 20:30:24 +00:00
|
|
|
exprFile = ./processes.nix;
|
2021-04-23 19:39:52 +00:00
|
|
|
extraParams = {
|
|
|
|
inherit nix-processmgmt;
|
|
|
|
};
|
2021-03-25 20:30:24 +00:00
|
|
|
|
|
|
|
readiness = {instanceName, instance, ...}:
|
|
|
|
''
|
|
|
|
machine.wait_for_open_port(${toString instance.port})
|
|
|
|
'';
|
|
|
|
|
|
|
|
tests = {instanceName, instance, ...}:
|
|
|
|
''
|
2023-09-20 16:36:47 +00:00
|
|
|
machine.succeed("curl --fail http://localhost:${toString instance.port} | grep 'Hello world'")
|
2021-03-25 20:30:24 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
inherit processManagers profiles;
|
|
|
|
}
|