summaryrefslogtreecommitdiff
path: root/test/buildtool/file_system
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-06-17 11:28:47 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-07-05 12:58:35 +0200
commitc88585ddf9386fb14154a4f3baa702569d55584a (patch)
tree05461204866831ab88364981390dae474f16247d /test/buildtool/file_system
parent8c73c618d777a07c017ec0deefe88db83652827e (diff)
downloadjustbuild-c88585ddf9386fb14154a4f3baa702569d55584a.tar.gz
Use StorageConfig functionality via Instance()
...to track changes during refactoring easier.
Diffstat (limited to 'test/buildtool/file_system')
-rw-r--r--test/buildtool/file_system/TARGETS1
-rw-r--r--test/buildtool/file_system/object_cas.test.cpp7
2 files changed, 5 insertions, 3 deletions
diff --git a/test/buildtool/file_system/TARGETS b/test/buildtool/file_system/TARGETS
index 512eb175..880cc368 100644
--- a/test/buildtool/file_system/TARGETS
+++ b/test/buildtool/file_system/TARGETS
@@ -26,6 +26,7 @@
, ["@", "src", "src/buildtool/file_system", "object_type"]
, ["@", "src", "src/buildtool/common", "bazel_types"]
, ["@", "src", "src/buildtool/common", "common"]
+ , ["@", "src", "src/buildtool/storage", "config"]
, ["utils", "local_hermeticity"]
]
, "stage": ["test", "buildtool", "file_system"]
diff --git a/test/buildtool/file_system/object_cas.test.cpp b/test/buildtool/file_system/object_cas.test.cpp
index 8bdfc0d8..6a809650 100644
--- a/test/buildtool/file_system/object_cas.test.cpp
+++ b/test/buildtool/file_system/object_cas.test.cpp
@@ -22,6 +22,7 @@
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/buildtool/file_system/object_cas.hpp"
#include "src/buildtool/file_system/object_type.hpp"
+#include "src/buildtool/storage/config.hpp"
#include "test/utils/hermeticity/local.hpp"
TEST_CASE_METHOD(HermeticLocalTestFixture, "ObjectCAS", "[file_system]") {
@@ -29,8 +30,8 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, "ObjectCAS", "[file_system]") {
auto test_digest = ArtifactDigest::Create<ObjectType::File>(test_content);
SECTION("CAS for files") {
- ObjectCAS<ObjectType::File> cas{StorageConfig::GenerationCacheDir(0) /
- "casf"};
+ ObjectCAS<ObjectType::File> cas{
+ StorageConfig::Instance().GenerationCacheDir(0) / "casf"};
CHECK(not cas.BlobPath(test_digest));
SECTION("Add blob from bytes and verify") {
@@ -69,7 +70,7 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, "ObjectCAS", "[file_system]") {
SECTION("CAS for executables") {
ObjectCAS<ObjectType::Executable> cas{
- StorageConfig::GenerationCacheDir(0) / "casx"};
+ StorageConfig::Instance().GenerationCacheDir(0) / "casx"};
CHECK(not cas.BlobPath(test_digest));
SECTION("Add blob from bytes and verify") {