From 457deb47d814cd1eaa79fd7cdbbe4d341ce49b04 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Wed, 29 Jan 2025 11:01:17 +0100 Subject: BazelCasClient: Drop iterators in BatchUpdateBlobs --- test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp | 8 ++------ test/utils/remote_execution/bazel_action_creator.hpp | 3 +-- 2 files changed, 3 insertions(+), 8 deletions(-) (limited to 'test') diff --git a/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp b/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp index 493d2f28..fe244151 100644 --- a/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp +++ b/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp @@ -68,9 +68,7 @@ TEST_CASE("Bazel internals: CAS Client", "[execution_api]") { if (not digests.empty()) { // Upload blob, if not found - std::unordered_set to_upload{blob}; - CHECK(cas_client.BatchUpdateBlobs( - instance_name, to_upload.begin(), to_upload.end()) == 1U); + CHECK(cas_client.BatchUpdateBlobs(instance_name, {blob}) == 1U); } // Read blob @@ -97,9 +95,7 @@ TEST_CASE("Bazel internals: CAS Client", "[execution_api]") { .size() == 1); // Try upload faulty blob - std::unordered_set to_upload{faulty_blob}; - CHECK(cas_client.BatchUpdateBlobs( - instance_name, to_upload.begin(), to_upload.end()) == 0U); + CHECK(cas_client.BatchUpdateBlobs(instance_name, {faulty_blob}) == 0U); // Read blob via faulty digest std::vector to_read{faulty_digest}; diff --git a/test/utils/remote_execution/bazel_action_creator.hpp b/test/utils/remote_execution/bazel_action_creator.hpp index 44315cea..b0038de9 100644 --- a/test/utils/remote_execution/bazel_action_creator.hpp +++ b/test/utils/remote_execution/bazel_action_creator.hpp @@ -108,8 +108,7 @@ &*auth_config, &retry_config); - if (cas_client.BatchUpdateBlobs( - instance_name, blobs.begin(), blobs.end()) == blobs.size()) { + if (cas_client.BatchUpdateBlobs(instance_name, blobs) == blobs.size()) { return std::make_unique(action_id); } return nullptr; -- cgit v1.2.3