diff options
| author | Dan Engelbrecht <[email protected]> | 2026-04-01 13:48:19 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-04-01 13:48:19 +0200 |
| commit | af208b5612ca9945242b40be4f65e76e0a32e8fa (patch) | |
| tree | 3c9629ed3506ebb5496e41db9d915837ab3db6c7 /src/zenserver-test/hub-tests.cpp | |
| parent | kill stale test processes (zenserver, minio, nomad, consul) before and after ... (diff) | |
| download | zen-af208b5612ca9945242b40be4f65e76e0a32e8fa.tar.xz zen-af208b5612ca9945242b40be4f65e76e0a32e8fa.zip | |
consul env token refresh (#912)
- Improvement: Consul token is now re-read from the environment variable on every request, allowing token rotation without restarting the service
Diffstat (limited to 'src/zenserver-test/hub-tests.cpp')
| -rw-r--r-- | src/zenserver-test/hub-tests.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/zenserver-test/hub-tests.cpp b/src/zenserver-test/hub-tests.cpp index b2da552fc..82dfd7e91 100644 --- a/src/zenserver-test/hub-tests.cpp +++ b/src/zenserver-test/hub-tests.cpp @@ -377,7 +377,7 @@ TEST_CASE("hub.consul.kv") consul::ConsulProcess ConsulProc; ConsulProc.SpawnConsulAgent(); - consul::ConsulClient Client("http://localhost:8500/"); + consul::ConsulClient Client({.BaseUri = "http://localhost:8500/"}); Client.SetKeyValue("zen/hub/testkey", "testvalue"); std::string RetrievedValue = Client.GetKeyValue("zen/hub/testkey"); @@ -399,7 +399,7 @@ TEST_CASE("hub.consul.hub.registration") "--consul-health-interval-seconds=5 --consul-deregister-after-seconds=60"); REQUIRE(PortNumber != 0); - consul::ConsulClient Client("http://localhost:8500/"); + consul::ConsulClient Client({.BaseUri = "http://localhost:8500/"}); REQUIRE(WaitForConsulService(Client, "zen-hub-test-instance", true, 5000)); // Verify custom intervals flowed through to the registered check @@ -480,7 +480,7 @@ TEST_CASE("hub.consul.hub.registration.token") // Use a plain client -- dev-mode Consul doesn't enforce ACLs, but the // server has exercised the ConsulTokenEnv -> GetEnvVariable -> ConsulClient path. - consul::ConsulClient Client("http://localhost:8500/"); + consul::ConsulClient Client({.BaseUri = "http://localhost:8500/"}); REQUIRE(WaitForConsulService(Client, "zen-hub-test-instance", true, 5000)); @@ -501,7 +501,7 @@ TEST_CASE("hub.consul.provision.registration") Instance.SpawnServerAndWaitUntilReady("--consul-endpoint=http://localhost:8500/ --instance-id=test-instance"); REQUIRE(PortNumber != 0); - consul::ConsulClient Client("http://localhost:8500/"); + consul::ConsulClient Client({.BaseUri = "http://localhost:8500/"}); REQUIRE(WaitForConsulService(Client, "zen-hub-test-instance", true, 5000)); |