summaryrefslogtreecommitdiff
path: root/test/buildtool/execution_api/local/local_execution.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/buildtool/execution_api/local/local_execution.test.cpp')
-rw-r--r--test/buildtool/execution_api/local/local_execution.test.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/test/buildtool/execution_api/local/local_execution.test.cpp b/test/buildtool/execution_api/local/local_execution.test.cpp
index 6f9ccfb1..480b34df 100644
--- a/test/buildtool/execution_api/local/local_execution.test.cpp
+++ b/test/buildtool/execution_api/local/local_execution.test.cpp
@@ -61,9 +61,10 @@ inline void SetLauncher() {
TEST_CASE_METHOD(HermeticLocalTestFixture,
"LocalExecution: No input, no output",
"[execution_api]") {
+ auto const storage = Storage::Create(&StorageConfig::Instance());
+
RepositoryConfig repo_config{};
- auto api = LocalApi(
- &StorageConfig::Instance(), &Storage::Instance(), &repo_config);
+ auto api = LocalApi(&StorageConfig::Instance(), &storage, &repo_config);
std::string test_content("test");
std::vector<std::string> const cmdline = {"echo", "-n", test_content};
@@ -108,9 +109,9 @@ TEST_CASE_METHOD(HermeticLocalTestFixture,
TEST_CASE_METHOD(HermeticLocalTestFixture,
"LocalExecution: No input, no output, env variables used",
"[execution_api]") {
+ auto const storage = Storage::Create(&StorageConfig::Instance());
RepositoryConfig repo_config{};
- auto api = LocalApi(
- &StorageConfig::Instance(), &Storage::Instance(), &repo_config);
+ auto api = LocalApi(&StorageConfig::Instance(), &storage, &repo_config);
std::string test_content("test from env var");
std::vector<std::string> const cmdline = {
@@ -159,9 +160,9 @@ TEST_CASE_METHOD(HermeticLocalTestFixture,
TEST_CASE_METHOD(HermeticLocalTestFixture,
"LocalExecution: No input, create output",
"[execution_api]") {
+ auto const storage = Storage::Create(&StorageConfig::Instance());
RepositoryConfig repo_config{};
- auto api = LocalApi(
- &StorageConfig::Instance(), &Storage::Instance(), &repo_config);
+ auto api = LocalApi(&StorageConfig::Instance(), &storage, &repo_config);
std::string test_content("test");
auto test_digest = ArtifactDigest::Create<ObjectType::File>(test_content);
@@ -216,9 +217,9 @@ TEST_CASE_METHOD(HermeticLocalTestFixture,
TEST_CASE_METHOD(HermeticLocalTestFixture,
"LocalExecution: One input copied to output",
"[execution_api]") {
+ auto const storage = Storage::Create(&StorageConfig::Instance());
RepositoryConfig repo_config{};
- auto api = LocalApi(
- &StorageConfig::Instance(), &Storage::Instance(), &repo_config);
+ auto api = LocalApi(&StorageConfig::Instance(), &storage, &repo_config);
std::string test_content("test");
auto test_digest = ArtifactDigest::Create<ObjectType::File>(test_content);
@@ -287,9 +288,9 @@ TEST_CASE_METHOD(HermeticLocalTestFixture,
TEST_CASE_METHOD(HermeticLocalTestFixture,
"LocalExecution: Cache failed action's result",
"[execution_api]") {
+ auto const storage = Storage::Create(&StorageConfig::Instance());
RepositoryConfig repo_config{};
- auto api = LocalApi(
- &StorageConfig::Instance(), &Storage::Instance(), &repo_config);
+ auto api = LocalApi(&StorageConfig::Instance(), &storage, &repo_config);
auto flag = GetTestDir() / "flag";
std::vector<std::string> const cmdline = {