From 62d204ff4cc94c12c1635f189255710901682825 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Fri, 12 Jul 2024 16:09:28 +0200 Subject: Remove the RemoteExecutionConfig singleton ...and replace it with passed instances created early via a builder pattern. Tests are also updated accordingly. --- test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp') diff --git a/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp b/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp index 4cd5e13b..68293fd2 100644 --- a/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp +++ b/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp @@ -25,10 +25,9 @@ #include "src/buildtool/execution_api/remote/config.hpp" #include "src/buildtool/file_system/object_type.hpp" #include "test/utils/remote_execution/test_auth_config.hpp" +#include "test/utils/remote_execution/test_remote_config.hpp" TEST_CASE("Bazel internals: CAS Client", "[execution_api]") { - auto const& info = RemoteExecutionConfig::RemoteAddress(); - std::string instance_name{"remote-execution"}; std::string content("test"); @@ -36,7 +35,12 @@ TEST_CASE("Bazel internals: CAS Client", "[execution_api]") { REQUIRE(auth_config); // Create CAS client - BazelCasClient cas_client(info->host, info->port, &*auth_config); + auto remote_config = TestRemoteConfig::ReadFromEnvironment(); + REQUIRE(remote_config); + REQUIRE(remote_config->remote_address); + BazelCasClient cas_client(remote_config->remote_address->host, + remote_config->remote_address->port, + &*auth_config); SECTION("Valid digest and blob") { // digest of "test" -- cgit v1.2.3