diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2025-01-29 09:46:58 +0100 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2025-02-07 14:58:04 +0100 |
commit | 95792fb717bd84d500037b62c77a4949274e670d (patch) | |
tree | 9bb1765a57e4d6d42941a33aff7e9721dec8068e /test/buildtool/execution_engine/executor | |
parent | ea2291d24d531a1ea221f1035636303ac0da787d (diff) | |
download | justbuild-95792fb717bd84d500037b62c77a4949274e670d.tar.gz |
Replace ArtifactBlobContainer and BazelBlobContainer
...with explicit std::unordered_set.
Diffstat (limited to 'test/buildtool/execution_engine/executor')
-rw-r--r-- | test/buildtool/execution_engine/executor/executor.test.cpp | 2 | ||||
-rw-r--r-- | test/buildtool/execution_engine/executor/executor_api.test.hpp | 9 |
2 files changed, 5 insertions, 6 deletions
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<std::string> override { return std::nullopt; // not needed by Executor } - [[nodiscard]] auto Upload(ArtifactBlobContainer&& blobs, + [[nodiscard]] auto Upload(std::unordered_set<ArtifactBlob>&& 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<ObjectType::File>( 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 = |