summaryrefslogtreecommitdiff
path: root/test/buildtool/file_system/object_cas.test.cpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-06-28 15:44:16 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-07-05 13:32:39 +0200
commit993245d862fcd44b1d8d404b970cbd774526ae2b (patch)
tree675efeae041524ca146be8adf7de2bb2886d9298 /test/buildtool/file_system/object_cas.test.cpp
parent849671f3d4ea482d208da4b5adf5c2c3556e25e4 (diff)
downloadjustbuild-993245d862fcd44b1d8d404b970cbd774526ae2b.tar.gz
Use StorageConfig with generation for initialization of Storage's generations
...instead of std::filesystem::path. StorageConfig is extended to return paths of Storage's parts.
Diffstat (limited to 'test/buildtool/file_system/object_cas.test.cpp')
-rw-r--r--test/buildtool/file_system/object_cas.test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/buildtool/file_system/object_cas.test.cpp b/test/buildtool/file_system/object_cas.test.cpp
index 6a809650..2fc0a405 100644
--- a/test/buildtool/file_system/object_cas.test.cpp
+++ b/test/buildtool/file_system/object_cas.test.cpp
@@ -29,9 +29,10 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, "ObjectCAS", "[file_system]") {
std::string test_content{"test"};
auto test_digest = ArtifactDigest::Create<ObjectType::File>(test_content);
+ auto gen_config = StorageConfig::Instance().CreateGenerationConfig(0);
+
SECTION("CAS for files") {
- ObjectCAS<ObjectType::File> cas{
- StorageConfig::Instance().GenerationCacheDir(0) / "casf"};
+ ObjectCAS<ObjectType::File> cas{gen_config.cas_f};
CHECK(not cas.BlobPath(test_digest));
SECTION("Add blob from bytes and verify") {
@@ -69,8 +70,7 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, "ObjectCAS", "[file_system]") {
}
SECTION("CAS for executables") {
- ObjectCAS<ObjectType::Executable> cas{
- StorageConfig::Instance().GenerationCacheDir(0) / "casx"};
+ ObjectCAS<ObjectType::Executable> cas{gen_config.cas_x};
CHECK(not cas.BlobPath(test_digest));
SECTION("Add blob from bytes and verify") {