From 8ee25f5ac4b1ecda1d5ce262fc48ad0c0e03a308 Mon Sep 17 00:00:00 2001 From: Alberto Sartori Date: Wed, 20 Dec 2023 16:52:23 +0100 Subject: BazelCasClient::DoUploadBlobs: returns the count of the uploaded blobs... ...instead of the vector containing the digests of the uploaded blobs. The returned vector was never inspected by the callers, except for its size. The tests have been accordingly amended. --- test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp') 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 8d21dbb3..d120360b 100644 --- a/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp +++ b/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp @@ -42,10 +42,8 @@ TEST_CASE("Bazel internals: CAS Client", "[execution_api]") { if (!digests.empty()) { // Upload blob, if not found std::vector to_upload{blob}; - CHECK(cas_client - .BatchUpdateBlobs( - instance_name, to_upload.begin(), to_upload.end()) - .size() == 1); + CHECK(cas_client.BatchUpdateBlobs( + instance_name, to_upload.begin(), to_upload.end()) == 1U); } // Read blob @@ -73,10 +71,8 @@ TEST_CASE("Bazel internals: CAS Client", "[execution_api]") { // Try upload faulty blob std::vector to_upload{faulty_blob}; - CHECK(cas_client - .BatchUpdateBlobs( - instance_name, to_upload.begin(), to_upload.end()) - .empty()); + CHECK(cas_client.BatchUpdateBlobs( + instance_name, to_upload.begin(), to_upload.end()) == 0U); // Read blob via faulty digest std::vector to_read{faulty_digest}; -- cgit v1.2.3