summaryrefslogtreecommitdiff
path: root/test/buildtool/execution_engine/executor
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-06-27 13:27:06 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-07-05 13:32:39 +0200
commit9f5dcef077a3db2f6c791e403e5036f6464c9576 (patch)
tree5e14f016207af83a8d0458a7ffe960ecba56280d /test/buildtool/execution_engine/executor
parent0d8a4ad15b93283cc31787b039051b9e9a285ba8 (diff)
downloadjustbuild-9f5dcef077a3db2f6c791e403e5036f6464c9576.tar.gz
Pass StorageConfig and Storage to LocalApi
Diffstat (limited to 'test/buildtool/execution_engine/executor')
-rw-r--r--test/buildtool/execution_engine/executor/TARGETS2
-rw-r--r--[-rwxr-xr-x]test/buildtool/execution_engine/executor/executor_api_local.test.cpp28
2 files changed, 24 insertions, 6 deletions
diff --git a/test/buildtool/execution_engine/executor/TARGETS b/test/buildtool/execution_engine/executor/TARGETS
index df0f9df6..c1b50f35 100644
--- a/test/buildtool/execution_engine/executor/TARGETS
+++ b/test/buildtool/execution_engine/executor/TARGETS
@@ -54,6 +54,8 @@
, ["utils", "local_hermeticity"]
, ["utils", "test_auth_config"]
, ["@", "catch2", "", "catch2"]
+ , ["@", "src", "src/buildtool/storage", "storage"]
+ , ["@", "src", "src/buildtool/storage", "config"]
]
, "stage": ["test", "buildtool", "execution_engine", "executor"]
}
diff --git a/test/buildtool/execution_engine/executor/executor_api_local.test.cpp b/test/buildtool/execution_engine/executor/executor_api_local.test.cpp
index 0572dc7b..ea6baa60 100755..100644
--- a/test/buildtool/execution_engine/executor/executor_api_local.test.cpp
+++ b/test/buildtool/execution_engine/executor/executor_api_local.test.cpp
@@ -21,6 +21,8 @@
#include "src/buildtool/execution_api/remote/config.hpp"
#include "src/buildtool/execution_engine/executor/executor.hpp"
#include "src/buildtool/progress_reporting/progress.hpp"
+#include "src/buildtool/storage/config.hpp"
+#include "src/buildtool/storage/storage.hpp"
#include "test/buildtool/execution_engine/executor/executor_api.test.hpp"
#include "test/utils/hermeticity/local.hpp"
#include "test/utils/remote_execution/test_auth_config.hpp"
@@ -29,8 +31,10 @@ TEST_CASE_METHOD(HermeticLocalTestFixture,
"Executor<LocalApi>: Upload blob",
"[executor]") {
RepositoryConfig repo_config{};
- TestBlobUpload(&repo_config,
- [&] { return std::make_unique<LocalApi>(&repo_config); });
+ TestBlobUpload(&repo_config, [&] {
+ return std::make_unique<LocalApi>(
+ &StorageConfig::Instance(), &Storage::Instance(), &repo_config);
+ });
}
TEST_CASE_METHOD(HermeticLocalTestFixture,
@@ -45,7 +49,10 @@ TEST_CASE_METHOD(HermeticLocalTestFixture,
&repo_config,
&stats,
&progress,
- [&] { return std::make_unique<LocalApi>(&repo_config); },
+ [&] {
+ return std::make_unique<LocalApi>(
+ &StorageConfig::Instance(), &Storage::Instance(), &repo_config);
+ },
&*auth_config);
}
@@ -61,7 +68,10 @@ TEST_CASE_METHOD(HermeticLocalTestFixture,
&repo_config,
&stats,
&progress,
- [&] { return std::make_unique<LocalApi>(&repo_config); },
+ [&] {
+ return std::make_unique<LocalApi>(
+ &StorageConfig::Instance(), &Storage::Instance(), &repo_config);
+ },
&*auth_config);
}
@@ -77,7 +87,10 @@ TEST_CASE_METHOD(HermeticLocalTestFixture,
&repo_config,
&stats,
&progress,
- [&] { return std::make_unique<LocalApi>(&repo_config); },
+ [&] {
+ return std::make_unique<LocalApi>(
+ &StorageConfig::Instance(), &Storage::Instance(), &repo_config);
+ },
&*auth_config);
}
@@ -93,6 +106,9 @@ TEST_CASE_METHOD(HermeticLocalTestFixture,
&repo_config,
&stats,
&progress,
- [&] { return std::make_unique<LocalApi>(&repo_config); },
+ [&] {
+ return std::make_unique<LocalApi>(
+ &StorageConfig::Instance(), &Storage::Instance(), &repo_config);
+ },
&*auth_config);
}