From 95792fb717bd84d500037b62c77a4949274e670d Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Wed, 29 Jan 2025 09:46:58 +0100 Subject: Replace ArtifactBlobContainer and BazelBlobContainer ...with explicit std::unordered_set. --- test/buildtool/execution_api/bazel/bazel_msg_factory.test.cpp | 3 ++- test/buildtool/execution_api/common/api_test.hpp | 6 +++--- test/buildtool/execution_api/local/local_execution.test.cpp | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'test/buildtool/execution_api') diff --git a/test/buildtool/execution_api/bazel/bazel_msg_factory.test.cpp b/test/buildtool/execution_api/bazel/bazel_msg_factory.test.cpp index 13840c4b..de366c18 100644 --- a/test/buildtool/execution_api/bazel/bazel_msg_factory.test.cpp +++ b/test/buildtool/execution_api/bazel/bazel_msg_factory.test.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -116,7 +117,7 @@ TEST_CASE("Bazel internals: MessageFactory", "[execution_api]") { {link_blob->digest, link}}; // create blobs via tree - ArtifactBlobContainer blobs{}; + std::unordered_set blobs{}; REQUIRE(BazelMsgFactory::CreateDirectoryDigestFromTree( *tree, [&fake_cas](std::vector const& digests, diff --git a/test/buildtool/execution_api/common/api_test.hpp b/test/buildtool/execution_api/common/api_test.hpp index fcb90634..5cfedef1 100644 --- a/test/buildtool/execution_api/common/api_test.hpp +++ b/test/buildtool/execution_api/common/api_test.hpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -253,9 +254,8 @@ using ExecProps = std::map; std::string output_path{"output_file"}; auto api = api_factory(); - CHECK(api->Upload(ArtifactBlobContainer{{ArtifactBlob{ - test_digest, test_content, /*is_exec=*/false}}}, - false)); + CHECK(api->Upload( + {ArtifactBlob{test_digest, test_content, /*is_exec=*/false}}, false)); auto action = api->CreateAction(*api->UploadTree({{input_path, &input_artifact}}), diff --git a/test/buildtool/execution_api/local/local_execution.test.cpp b/test/buildtool/execution_api/local/local_execution.test.cpp index dff30d51..4c5565e1 100644 --- a/test/buildtool/execution_api/local/local_execution.test.cpp +++ b/test/buildtool/execution_api/local/local_execution.test.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -274,9 +275,8 @@ TEST_CASE("LocalExecution: One input copied to output", "[execution_api]") { std::string test_content("test"); auto test_digest = ArtifactDigestFactory::HashDataAs( storage_config.Get().hash_function, test_content); - REQUIRE(api.Upload(ArtifactBlobContainer{{ArtifactBlob{ - test_digest, test_content, /*is_exec=*/false}}}, - false)); + REQUIRE(api.Upload( + {ArtifactBlob{test_digest, test_content, /*is_exec=*/false}}, false)); std::string input_path{"dir/subdir/input"}; std::string output_path{"output_file"}; -- cgit v1.2.3