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 = "influxdb";
|
2021-03-25 20:30:24 +00:00
|
|
|
exprFile = ./processes.nix;
|
|
|
|
systemPackages = [ pkgs.influxdb ];
|
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.httpPort})
|
|
|
|
'';
|
|
|
|
|
|
|
|
tests = {instanceName, instance, runtimeDir, forceDisableUserChange, ...}:
|
|
|
|
# Make a special exception for the first instance running in privileged mode. It should be connectible with the default settings
|
|
|
|
if instanceName == "influxdb" && !forceDisableUserChange then ''
|
|
|
|
machine.succeed("influx -execute 'show databases' >&2")
|
|
|
|
'' else ''
|
|
|
|
machine.succeed("influx -execute 'show databases' --port ${toString instance.httpPort} >&2")
|
|
|
|
'';
|
|
|
|
|
|
|
|
inherit processManagers profiles;
|
|
|
|
}
|