diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2025-02-20 12:35:12 +0100 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2025-02-21 14:46:30 +0100 |
commit | ff9a8dfbe17f88cec92a00f00d2dbfb9015e342b (patch) | |
tree | 6702b58bf7235c324f45c5458edb9172faaab836 /test/buildtool | |
parent | e8c157aed3fed0472d14b205c6b1dc78c393a430 (diff) | |
download | justbuild-ff9a8dfbe17f88cec92a00f00d2dbfb9015e342b.tar.gz |
ByteStreamClient: Use ByteStreamUtils::ReadRequest internally only.
Diffstat (limited to 'test/buildtool')
-rw-r--r-- | test/buildtool/execution_api/bazel/TARGETS | 1 | ||||
-rw-r--r-- | test/buildtool/execution_api/bazel/bytestream_client.test.cpp | 11 |
2 files changed, 3 insertions, 9 deletions
diff --git a/test/buildtool/execution_api/bazel/TARGETS b/test/buildtool/execution_api/bazel/TARGETS index edbaf311..19797ea1 100644 --- a/test/buildtool/execution_api/bazel/TARGETS +++ b/test/buildtool/execution_api/bazel/TARGETS @@ -58,7 +58,6 @@ , ["@", "src", "src/buildtool/common/remote", "remote_common"] , ["@", "src", "src/buildtool/crypto", "hash_function"] , ["@", "src", "src/buildtool/execution_api/common", "artifact_blob"] - , ["@", "src", "src/buildtool/execution_api/common", "bytestream_utils"] , ["@", "src", "src/buildtool/execution_api/common", "common"] , ["@", "src", "src/buildtool/execution_api/common", "ids"] , ["@", "src", "src/buildtool/execution_api/remote", "bazel_network"] 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(); |