From 9c260fd0f7eb2f367b41a6b5f5d6da4c6d832196 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 22 Aug 2024 23:28:22 +0200 Subject: [PATCH] cluster/services/consul: adjust test --- cluster/services/consul/test.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cluster/services/consul/test.nix b/cluster/services/consul/test.nix index d3ed32d..d0066bb 100644 --- a/cluster/services/consul/test.nix +++ b/cluster/services/consul/test.nix @@ -1,8 +1,4 @@ -{ lib, ... }: - { - defaults.options.services.locksmith = lib.mkSinkUndeclaredOptions { }; - testScript = '' import json @@ -11,12 +7,12 @@ with subtest("should form cluster"): nodes = [ n for n in machines if n != nowhere ] for machine in nodes: - machine.succeed("systemctl start consul-ready.service") + machine.succeed("systemctl start consul-ready.target") for machine in nodes: consulConfig = json.loads(machine.succeed("cat /etc/consul.json")) addr = consulConfig["addresses"]["http"] port = consulConfig["ports"]["http"] - setEnv = f"CONSUL_HTTP_ADDR={addr}:{port}" + setEnv = f"CONSUL_HTTP_ADDR={addr}:{port} CONSUL_HTTP_TOKEN_FILE=/run/locksmith/consul-systemManagementToken" memberList = machine.succeed(f"{setEnv} consul members --status=alive") for machine2 in nodes: assert machine2.name in memberList