diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-07-26 12:50:44 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-07-30 12:10:06 +0200 |
commit | 461ba224785cba270b37375d9dc25f06a630d723 (patch) | |
tree | 34feabfb51d458284d218213214ce343bc530ba1 /test/buildtool/serve_api/source_tree_client.test.cpp | |
parent | c499f460cd68d505338d9c081863418a413d1c0f (diff) | |
download | justbuild-461ba224785cba270b37375d9dc25f06a630d723.tar.gz |
Pass LocalContext and RemoteContext to ServeApi
Also switch to using the fields from RemoteContext instances
instead of those from ApiBundle.
Diffstat (limited to 'test/buildtool/serve_api/source_tree_client.test.cpp')
-rw-r--r-- | test/buildtool/serve_api/source_tree_client.test.cpp | 11 |
1 files changed, 10 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 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); |