summaryrefslogtreecommitdiff
path: root/test/buildtool/serve_api/source_tree_client.test.cpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-06-13 14:13:01 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-06-18 12:05:10 +0200
commit05b734f11b7a45a1da5c38fcc1f27780c3fe4354 (patch)
treef784191e033ff0f32c79439e4036423d7d066ce2 /test/buildtool/serve_api/source_tree_client.test.cpp
parent866391f5436488cec823ad6bc0a446c0c9d70625 (diff)
downloadjustbuild-05b734f11b7a45a1da5c38fcc1f27780c3fe4354.tar.gz
Create an individual instance of RemoteServeConfig in tests
...instead of intialization of the singleton.
Diffstat (limited to 'test/buildtool/serve_api/source_tree_client.test.cpp')
-rw-r--r--test/buildtool/serve_api/source_tree_client.test.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/buildtool/serve_api/source_tree_client.test.cpp b/test/buildtool/serve_api/source_tree_client.test.cpp
index 3de6e864..604471cb 100644
--- a/test/buildtool/serve_api/source_tree_client.test.cpp
+++ b/test/buildtool/serve_api/source_tree_client.test.cpp
@@ -18,6 +18,7 @@
#include "catch2/catch_test_macros.hpp"
#include "src/buildtool/serve_api/remote/config.hpp"
#include "src/buildtool/serve_api/remote/source_tree_client.hpp"
+#include "test/utils/serve_service/test_serve_config.hpp"
auto const kRootCommit =
std::string{"e4fc610c60716286b98cf51ad0c8f0d50f3aebb5"};
@@ -30,7 +31,9 @@ auto const kRootSymId = std::string{"18770dacfe14c15d88450c21c16668e13ab0e7f9"};
auto const kBazSymId = std::string{"1868f82682c290f0b1db3cacd092727eef1fa57f"};
TEST_CASE("Serve service client: tree-of-commit request", "[serve_api]") {
- auto const address = RemoteServeConfig::Instance().RemoteAddress();
+ auto config = TestServeConfig::ReadServeConfigFromEnvironment();
+ REQUIRE(config);
+ auto const address = config->RemoteAddress();
// Create TLC client
SourceTreeClient st_client(*address);