summaryrefslogtreecommitdiff
path: root/test/buildtool/execution_engine/executor/executor.test.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-26 10:56:00 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-30 12:10:06 +0200
commit138c171f3d3c24642074329a303932f46e9f19d1 (patch)
tree77c90e23a015b52410c1fc1d058ba51d84b9b824 /test/buildtool/execution_engine/executor/executor.test.cpp
parent09fb60908a7f00a7c858a45ced77633bac33bd29 (diff)
downloadjustbuild-138c171f3d3c24642074329a303932f46e9f19d1.tar.gz
Pass RemoteContext to Executor/Rebuilder
Diffstat (limited to 'test/buildtool/execution_engine/executor/executor.test.cpp')
-rw-r--r--test/buildtool/execution_engine/executor/executor.test.cpp101
1 files changed, 56 insertions, 45 deletions
diff --git a/test/buildtool/execution_engine/executor/executor.test.cpp b/test/buildtool/execution_engine/executor/executor.test.cpp
index dcdfd2dd..2e8a03aa 100644
--- a/test/buildtool/execution_engine/executor/executor.test.cpp
+++ b/test/buildtool/execution_engine/executor/executor.test.cpp
@@ -30,6 +30,8 @@
#include "src/buildtool/compatibility/compatibility.hpp"
#include "src/buildtool/crypto/hash_function.hpp"
#include "src/buildtool/execution_api/common/execution_api.hpp"
+#include "src/buildtool/execution_api/remote/config.hpp"
+#include "src/buildtool/execution_api/remote/context.hpp"
#include "src/buildtool/execution_engine/executor/executor.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/buildtool/progress_reporting/progress.hpp"
@@ -289,15 +291,16 @@ TEST_CASE("Executor: Process artifact", "[executor]") {
Statistics stats{};
Progress progress{};
Auth auth{};
- RetryConfig retry_config{}; // default retry config
+ RetryConfig retry_config{}; // default retry config
+ RemoteExecutionConfig remote_config{}; // default remote config
+ RemoteContext const remote_context{.auth = &auth,
+ .retry_config = &retry_config,
+ .exec_config = &remote_config};
Executor runner{&repo_config,
api.get(),
api.get(),
- /*properties=*/{},
- /*dispatch_list=*/{},
+ &remote_context,
hash_function,
- &auth,
- &retry_config,
&stats,
&progress};
@@ -312,15 +315,16 @@ TEST_CASE("Executor: Process artifact", "[executor]") {
Statistics stats{};
Progress progress{};
Auth auth{};
- RetryConfig retry_config{}; // default retry config
+ RetryConfig retry_config{}; // default retry config
+ RemoteExecutionConfig remote_config{}; // default remote config
+ RemoteContext const remote_context{.auth = &auth,
+ .retry_config = &retry_config,
+ .exec_config = &remote_config};
Executor runner{&repo_config,
api.get(),
api.get(),
- /*properties=*/{},
- /*dispatch_list=*/{},
+ &remote_context,
hash_function,
- &auth,
- &retry_config,
&stats,
&progress};
@@ -335,15 +339,16 @@ TEST_CASE("Executor: Process artifact", "[executor]") {
Statistics stats{};
Progress progress{};
Auth auth{};
- RetryConfig retry_config{}; // default retry config
+ RetryConfig retry_config{}; // default retry config
+ RemoteExecutionConfig remote_config{}; // default remote config
+ RemoteContext const remote_context{.auth = &auth,
+ .retry_config = &retry_config,
+ .exec_config = &remote_config};
Executor runner{&repo_config,
api.get(),
api.get(),
- /*properties=*/{},
- /*dispatch_list=*/{},
+ &remote_context,
hash_function,
- &auth,
- &retry_config,
&stats,
&progress};
@@ -383,15 +388,16 @@ TEST_CASE("Executor: Process action", "[executor]") {
Statistics stats{};
Progress progress{};
Auth auth{};
- RetryConfig retry_config{}; // default retry config
+ RetryConfig retry_config{}; // default retry config
+ RemoteExecutionConfig remote_config{}; // default remote config
+ RemoteContext const remote_context{.auth = &auth,
+ .retry_config = &retry_config,
+ .exec_config = &remote_config};
Executor runner{&repo_config,
api.get(),
api.get(),
- /*properties=*/{},
- /*dispatch_list=*/{},
+ &remote_context,
hash_function,
- &auth,
- &retry_config,
&stats,
&progress};
@@ -409,15 +415,16 @@ TEST_CASE("Executor: Process action", "[executor]") {
Statistics stats{};
Progress progress{};
Auth auth{};
- RetryConfig retry_config{}; // default retry config
+ RetryConfig retry_config{}; // default retry config
+ RemoteExecutionConfig remote_config{}; // default remote config
+ RemoteContext const remote_context{.auth = &auth,
+ .retry_config = &retry_config,
+ .exec_config = &remote_config};
Executor runner{&repo_config,
api.get(),
api.get(),
- /*properties=*/{},
- /*dispatch_list=*/{},
+ &remote_context,
hash_function,
- &auth,
- &retry_config,
&stats,
&progress};
@@ -435,15 +442,16 @@ TEST_CASE("Executor: Process action", "[executor]") {
Statistics stats{};
Progress progress{};
Auth auth{};
- RetryConfig retry_config{}; // default retry config
+ RetryConfig retry_config{}; // default retry config
+ RemoteExecutionConfig remote_config{}; // default remote config
+ RemoteContext const remote_context{.auth = &auth,
+ .retry_config = &retry_config,
+ .exec_config = &remote_config};
Executor runner{&repo_config,
api.get(),
api.get(),
- /*properties=*/{},
- /*dispatch_list=*/{},
+ &remote_context,
hash_function,
- &auth,
- &retry_config,
&stats,
&progress};
@@ -464,15 +472,16 @@ TEST_CASE("Executor: Process action", "[executor]") {
Statistics stats{};
Progress progress{};
Auth auth{};
- RetryConfig retry_config{}; // default retry config
+ RetryConfig retry_config{}; // default retry config
+ RemoteExecutionConfig remote_config{}; // default remote config
+ RemoteContext const remote_context{.auth = &auth,
+ .retry_config = &retry_config,
+ .exec_config = &remote_config};
Executor runner{&repo_config,
api.get(),
api.get(),
- /*properties=*/{},
- /*dispatch_list=*/{},
+ &remote_context,
hash_function,
- &auth,
- &retry_config,
&stats,
&progress};
@@ -490,15 +499,16 @@ TEST_CASE("Executor: Process action", "[executor]") {
Statistics stats{};
Progress progress{};
Auth auth{};
- RetryConfig retry_config{}; // default retry config
+ RetryConfig retry_config{}; // default retry config
+ RemoteExecutionConfig remote_config{}; // default remote config
+ RemoteContext const remote_context{.auth = &auth,
+ .retry_config = &retry_config,
+ .exec_config = &remote_config};
Executor runner{&repo_config,
api.get(),
api.get(),
- /*properties=*/{},
- /*dispatch_list=*/{},
+ &remote_context,
hash_function,
- &auth,
- &retry_config,
&stats,
&progress};
@@ -519,15 +529,16 @@ TEST_CASE("Executor: Process action", "[executor]") {
Statistics stats{};
Progress progress{};
Auth auth{};
- RetryConfig retry_config{}; // default retry config
+ RetryConfig retry_config{}; // default retry config
+ RemoteExecutionConfig remote_config{}; // default remote config
+ RemoteContext const remote_context{.auth = &auth,
+ .retry_config = &retry_config,
+ .exec_config = &remote_config};
Executor runner{&repo_config,
api.get(),
api.get(),
- /*properties=*/{},
- /*dispatch_list=*/{},
+ &remote_context,
hash_function,
- &auth,
- &retry_config,
&stats,
&progress};