From ff9a8dfbe17f88cec92a00f00d2dbfb9015e342b Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 20 Feb 2025 12:35:12 +0100 Subject: ByteStreamClient: Use ByteStreamUtils::ReadRequest internally only. --- test/buildtool/execution_api/bazel/bytestream_client.test.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'test/buildtool/execution_api/bazel/bytestream_client.test.cpp') diff --git a/test/buildtool/execution_api/bazel/bytestream_client.test.cpp b/test/buildtool/execution_api/bazel/bytestream_client.test.cpp index 96a95701..f607bc3a 100644 --- a/test/buildtool/execution_api/bazel/bytestream_client.test.cpp +++ b/test/buildtool/execution_api/bazel/bytestream_client.test.cpp @@ -27,7 +27,6 @@ #include "src/buildtool/common/remote/remote_common.hpp" #include "src/buildtool/crypto/hash_function.hpp" #include "src/buildtool/execution_api/common/artifact_blob.hpp" -#include "src/buildtool/execution_api/common/bytestream_utils.hpp" #include "src/buildtool/execution_api/remote/config.hpp" #include "src/buildtool/file_system/object_type.hpp" #include "test/utils/hermeticity/test_hash_function_type.hpp" @@ -59,8 +58,7 @@ TEST_CASE("ByteStream Client: Transfer single blob", "[execution_api]") { ArtifactBlob const blob{digest, content, /*is_exec=*/false}; CHECK(stream.Write(instance_name, blob)); - auto const data = - stream.Read(ByteStreamUtils::ReadRequest{instance_name, digest}); + auto const data = stream.Read(instance_name, digest); CHECK(data == content); } @@ -96,15 +94,12 @@ TEST_CASE("ByteStream Client: Transfer single blob", "[execution_api]") { CHECK(stream.Write(instance_name, blob)); SECTION("Download large blob") { - auto const data = stream.Read( - ByteStreamUtils::ReadRequest{instance_name, digest}); - + auto const data = stream.Read(instance_name, digest); CHECK(data == content); } SECTION("Incrementally download large blob") { - auto reader = stream.IncrementalRead( - ByteStreamUtils::ReadRequest{instance_name, digest}); + auto reader = stream.IncrementalRead(instance_name, digest); std::string data{}; auto chunk = reader.Next(); -- cgit v1.2.3