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_engine/executor/executor.test.cpp | 2 +- test/buildtool/execution_engine/executor/executor_api.test.hpp | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'test/buildtool/execution_engine/executor') diff --git a/test/buildtool/execution_engine/executor/executor.test.cpp b/test/buildtool/execution_engine/executor/executor.test.cpp index 834a63ca..531e8301 100644 --- a/test/buildtool/execution_engine/executor/executor.test.cpp +++ b/test/buildtool/execution_engine/executor/executor.test.cpp @@ -220,7 +220,7 @@ class TestApi : public IExecutionApi { -> std::optional override { return std::nullopt; // not needed by Executor } - [[nodiscard]] auto Upload(ArtifactBlobContainer&& blobs, + [[nodiscard]] auto Upload(std::unordered_set&& blobs, bool /*unused*/) const noexcept -> bool final { return std::all_of( blobs.begin(), blobs.end(), [this](auto const& blob) { diff --git a/test/buildtool/execution_engine/executor/executor_api.test.hpp b/test/buildtool/execution_engine/executor/executor_api.test.hpp index b61b66d3..dc3e98e4 100644 --- a/test/buildtool/execution_engine/executor/executor_api.test.hpp +++ b/test/buildtool/execution_engine/executor/executor_api.test.hpp @@ -71,11 +71,11 @@ static inline void RunBlobUpload(RepositoryConfig* repo_config, HashFunction const hash_function{TestHashType::ReadFromEnvironment()}; std::string const blob = "test"; - CHECK(api->Upload(ArtifactBlobContainer{ + CHECK(api->Upload( {ArtifactBlob{ArtifactDigestFactory::HashDataAs( hash_function, blob), blob, - /*is_exec=*/false}}})); + /*is_exec=*/false}})); } [[nodiscard]] static inline auto GetTestDir() -> std::filesystem::path { @@ -437,9 +437,8 @@ static inline void TestUploadAndDownloadTrees( // upload blobs auto api = factory(); - REQUIRE(api->Upload(ArtifactBlobContainer{ - {ArtifactBlob{foo_digest, foo, /*is_exec=*/false}, - ArtifactBlob{bar_digest, bar, /*is_exec=*/false}}})); + REQUIRE(api->Upload({ArtifactBlob{foo_digest, foo, /*is_exec=*/false}, + ArtifactBlob{bar_digest, bar, /*is_exec=*/false}})); // define known artifacts auto foo_desc = -- cgit v1.2.3