diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2025-01-29 11:01:17 +0100 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2025-02-07 14:58:04 +0100 |
commit | 457deb47d814cd1eaa79fd7cdbbe4d341ce49b04 (patch) | |
tree | a72cb0d9d9bddc286eeef50f082e0912116ac15c /test | |
parent | 29d9c27744b46ca1c5297939fc7506582ef71192 (diff) | |
download | justbuild-457deb47d814cd1eaa79fd7cdbbe4d341ce49b04.tar.gz |
BazelCasClient: Drop iterators in BatchUpdateBlobs
Diffstat (limited to 'test')
-rw-r--r-- | test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp | 8 | ||||
-rw-r--r-- | test/utils/remote_execution/bazel_action_creator.hpp | 3 |
2 files changed, 3 insertions, 8 deletions
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<BazelBlob> 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<BazelBlob> 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<bazel_re::Digest> 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<bazel_re::Digest>(action_id); } return nullptr; |