summaryrefslogtreecommitdiff
path: root/test/buildtool/serve_api
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-26 12:50:44 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-30 12:10:06 +0200
commit461ba224785cba270b37375d9dc25f06a630d723 (patch)
tree34feabfb51d458284d218213214ce343bc530ba1 /test/buildtool/serve_api
parentc499f460cd68d505338d9c081863418a413d1c0f (diff)
downloadjustbuild-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')
-rw-r--r--test/buildtool/serve_api/TARGETS3
-rw-r--r--test/buildtool/serve_api/source_tree_client.test.cpp11
2 files changed, 13 insertions, 1 deletions
diff --git a/test/buildtool/serve_api/TARGETS b/test/buildtool/serve_api/TARGETS
index 279692ad..4e903d83 100644
--- a/test/buildtool/serve_api/TARGETS
+++ b/test/buildtool/serve_api/TARGETS
@@ -7,6 +7,9 @@
[ ["@", "catch2", "", "catch2"]
, ["utils", "catch-main-serve"]
, ["@", "src", "src/buildtool/auth", "auth"]
+ , ["@", "src", "src/buildtool/common/remote", "retry_config"]
+ , ["@", "src", "src/buildtool/execution_api/remote", "config"]
+ , ["@", "src", "src/buildtool/execution_api/remote", "context"]
, ["@", "src", "src/buildtool/serve_api/remote", "source_tree_client"]
, ["utils", "test_serve_config"]
, ["@", "src", "src/buildtool/serve_api/remote", "config"]
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);