From 461ba224785cba270b37375d9dc25f06a630d723 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Fri, 26 Jul 2024 12:50:44 +0200 Subject: Pass LocalContext and RemoteContext to ServeApi Also switch to using the fields from RemoteContext instances instead of those from ApiBundle. --- test/buildtool/serve_api/source_tree_client.test.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'test/buildtool/serve_api/source_tree_client.test.cpp') diff --git a/test/buildtool/serve_api/source_tree_client.test.cpp b/test/buildtool/serve_api/source_tree_client.test.cpp index e1f6d84b..d44a1605 100644 --- a/test/buildtool/serve_api/source_tree_client.test.cpp +++ b/test/buildtool/serve_api/source_tree_client.test.cpp @@ -17,6 +17,9 @@ #include "catch2/catch_test_macros.hpp" #include "src/buildtool/auth/authentication.hpp" +#include "src/buildtool/common/remote/retry_config.hpp" +#include "src/buildtool/execution_api/remote/config.hpp" +#include "src/buildtool/execution_api/remote/context.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" @@ -38,7 +41,13 @@ TEST_CASE("Serve service client: tree-of-commit request", "[serve_api]") { // Create TLC client Auth auth{}; - SourceTreeClient st_client(*config->remote_address, &auth); + RetryConfig retry_config{}; + RemoteExecutionConfig exec_config{}; + RemoteContext const remote_context{.auth = &auth, + .retry_config = &retry_config, + .exec_config = &exec_config}; + + SourceTreeClient st_client(*config->remote_address, &remote_context); SECTION("Commit in bare checkout") { auto root_id = st_client.ServeCommitTree(kRootCommit, ".", false); -- cgit v1.2.3