summaryrefslogtreecommitdiff
path: root/test/buildtool/execution_api/bazel/bytestream_client.test.cpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2025-02-20 12:35:12 +0100
committerMaksim Denisov <denisov.maksim@huawei.com>2025-02-21 14:46:30 +0100
commitff9a8dfbe17f88cec92a00f00d2dbfb9015e342b (patch)
tree6702b58bf7235c324f45c5458edb9172faaab836 /test/buildtool/execution_api/bazel/bytestream_client.test.cpp
parente8c157aed3fed0472d14b205c6b1dc78c393a430 (diff)
downloadjustbuild-ff9a8dfbe17f88cec92a00f00d2dbfb9015e342b.tar.gz
ByteStreamClient: Use ByteStreamUtils::ReadRequest internally only.
Diffstat (limited to 'test/buildtool/execution_api/bazel/bytestream_client.test.cpp')
-rw-r--r--test/buildtool/execution_api/bazel/bytestream_client.test.cpp11
1 files changed, 3 insertions, 8 deletions
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();