summaryrefslogtreecommitdiff
path: root/test/buildtool/execution_api/execution_service
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-07-02 13:21:14 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-07-05 13:32:39 +0200
commitd202e8f6051df5eb89d0f2eb1b9ac7109d204f56 (patch)
tree562d90c0a5396a259d11c4288162403489a6e4fd /test/buildtool/execution_api/execution_service
parent5140befaa10f65145fe041b416b7764127efc379 (diff)
downloadjustbuild-d202e8f6051df5eb89d0f2eb1b9ac7109d204f56.tar.gz
Remove HermeticLocalTestFixture
...and create StorageConfig and Storage in place if needed.
Diffstat (limited to 'test/buildtool/execution_api/execution_service')
-rw-r--r--test/buildtool/execution_api/execution_service/TARGETS2
-rw-r--r--test/buildtool/execution_api/execution_service/cas_server.test.cpp11
2 files changed, 6 insertions, 7 deletions
diff --git a/test/buildtool/execution_api/execution_service/TARGETS b/test/buildtool/execution_api/execution_service/TARGETS
index c14db85c..754615d5 100644
--- a/test/buildtool/execution_api/execution_service/TARGETS
+++ b/test/buildtool/execution_api/execution_service/TARGETS
@@ -5,7 +5,7 @@
, "private-deps":
[ ["", "catch-main"]
, ["@", "catch2", "", "catch2"]
- , ["utils", "local_hermeticity"]
+ , ["utils", "test_storage_config"]
, [ "@"
, "src"
, "src/buildtool/execution_api/execution_service"
diff --git a/test/buildtool/execution_api/execution_service/cas_server.test.cpp b/test/buildtool/execution_api/execution_service/cas_server.test.cpp
index 5b6e50b5..a7791cd5 100644
--- a/test/buildtool/execution_api/execution_service/cas_server.test.cpp
+++ b/test/buildtool/execution_api/execution_service/cas_server.test.cpp
@@ -22,7 +22,7 @@
#include "src/buildtool/file_system/object_type.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 {
[[nodiscard]] auto Upload(
@@ -41,12 +41,11 @@ namespace {
}
} // namespace
-TEST_CASE_METHOD(HermeticLocalTestFixture,
- "CAS Service: upload incomplete tree",
- "[execution_service]") {
- auto const storage = Storage::Create(&StorageConfig::Instance());
+TEST_CASE("CAS Service: upload incomplete tree", "[execution_service]") {
+ auto const storage_config = TestStorageConfig::Create();
+ auto const storage = Storage::Create(&storage_config.Get());
- auto cas_server = CASServiceImpl{&StorageConfig::Instance(), &storage};
+ auto cas_server = CASServiceImpl{&storage_config.Get(), &storage};
auto instance_name = std::string{"remote-execution"};
// Create an empty tree.