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.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/test/buildtool/execution_api/local/local_execution.test.cpp b/test/buildtool/execution_api/local/local_execution.test.cpp
index 480b34df..bbd48ddc 100644
--- a/test/buildtool/execution_api/local/local_execution.test.cpp
+++ b/test/buildtool/execution_api/local/local_execution.test.cpp
@@ -28,7 +28,7 @@
#include "src/buildtool/logging/logger.hpp"
#include "src/buildtool/storage/config.hpp"
#include "src/buildtool/storage/storage.hpp"
-#include "test/utils/hermeticity/local.hpp"
+#include "test/utils/hermeticity/test_storage_config.hpp"
namespace {
@@ -58,13 +58,12 @@ inline void SetLauncher() {
} // namespace
-TEST_CASE_METHOD(HermeticLocalTestFixture,
- "LocalExecution: No input, no output",
- "[execution_api]") {
- auto const storage = Storage::Create(&StorageConfig::Instance());
+TEST_CASE("LocalExecution: No input, no output", "[execution_api]") {
+ auto const storage_config = TestStorageConfig::Create();
+ auto const storage = Storage::Create(&storage_config.Get());
RepositoryConfig repo_config{};
- auto api = LocalApi(&StorageConfig::Instance(), &storage, &repo_config);
+ auto api = LocalApi(&storage_config.Get(), &storage, &repo_config);
std::string test_content("test");
std::vector<std::string> const cmdline = {"echo", "-n", test_content};
@@ -106,12 +105,13 @@ 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());
+TEST_CASE("LocalExecution: No input, no output, env variables used",
+ "[execution_api]") {
+ auto const storage_config = TestStorageConfig::Create();
+ auto const storage = Storage::Create(&storage_config.Get());
+
RepositoryConfig repo_config{};
- auto api = LocalApi(&StorageConfig::Instance(), &storage, &repo_config);
+ auto api = LocalApi(&storage_config.Get(), &storage, &repo_config);
std::string test_content("test from env var");
std::vector<std::string> const cmdline = {
@@ -157,12 +157,12 @@ TEST_CASE_METHOD(HermeticLocalTestFixture,
}
}
-TEST_CASE_METHOD(HermeticLocalTestFixture,
- "LocalExecution: No input, create output",
- "[execution_api]") {
- auto const storage = Storage::Create(&StorageConfig::Instance());
+TEST_CASE("LocalExecution: No input, create output", "[execution_api]") {
+ auto const storage_config = TestStorageConfig::Create();
+ auto const storage = Storage::Create(&storage_config.Get());
+
RepositoryConfig repo_config{};
- auto api = LocalApi(&StorageConfig::Instance(), &storage, &repo_config);
+ auto api = LocalApi(&storage_config.Get(), &storage, &repo_config);
std::string test_content("test");
auto test_digest = ArtifactDigest::Create<ObjectType::File>(test_content);
@@ -214,12 +214,12 @@ TEST_CASE_METHOD(HermeticLocalTestFixture,
}
}
-TEST_CASE_METHOD(HermeticLocalTestFixture,
- "LocalExecution: One input copied to output",
- "[execution_api]") {
- auto const storage = Storage::Create(&StorageConfig::Instance());
+TEST_CASE("LocalExecution: One input copied to output", "[execution_api]") {
+ auto const storage_config = TestStorageConfig::Create();
+ auto const storage = Storage::Create(&storage_config.Get());
+
RepositoryConfig repo_config{};
- auto api = LocalApi(&StorageConfig::Instance(), &storage, &repo_config);
+ auto api = LocalApi(&storage_config.Get(), &storage, &repo_config);
std::string test_content("test");
auto test_digest = ArtifactDigest::Create<ObjectType::File>(test_content);
@@ -285,12 +285,12 @@ TEST_CASE_METHOD(HermeticLocalTestFixture,
}
}
-TEST_CASE_METHOD(HermeticLocalTestFixture,
- "LocalExecution: Cache failed action's result",
- "[execution_api]") {
- auto const storage = Storage::Create(&StorageConfig::Instance());
+TEST_CASE("LocalExecution: Cache failed action's result", "[execution_api]") {
+ auto const storage_config = TestStorageConfig::Create();
+ auto const storage = Storage::Create(&storage_config.Get());
+
RepositoryConfig repo_config{};
- auto api = LocalApi(&StorageConfig::Instance(), &storage, &repo_config);
+ auto api = LocalApi(&storage_config.Get(), &storage, &repo_config);
auto flag = GetTestDir() / "flag";
std::vector<std::string> const cmdline = {