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-25 11:46:51 +0100
committerMaksim Denisov <denisov.maksim@huawei.com>2025-02-27 09:03:30 +0100
commitb3c6d3572784575811ff130d859e92b799e77bb3 (patch)
treedc37456d28fa9e464bdd50eb3218a6917c73e4be /test/buildtool/execution_api/bazel/bytestream_client.test.cpp
parent9a987188a38cc18f6a485bd5def16aded10fe1f6 (diff)
downloadjustbuild-b3c6d3572784575811ff130d859e92b799e77bb3.tar.gz
ArtifactBlob: Check access to the content
Diffstat (limited to 'test/buildtool/execution_api/bazel/bytestream_client.test.cpp')
-rw-r--r--test/buildtool/execution_api/bazel/bytestream_client.test.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/buildtool/execution_api/bazel/bytestream_client.test.cpp b/test/buildtool/execution_api/bazel/bytestream_client.test.cpp
index 4676a5c6..991dcf72 100644
--- a/test/buildtool/execution_api/bazel/bytestream_client.test.cpp
+++ b/test/buildtool/execution_api/bazel/bytestream_client.test.cpp
@@ -61,7 +61,10 @@ TEST_CASE("ByteStream Client: Transfer single blob", "[execution_api]") {
auto const downloaded_blob = stream.Read(instance_name, digest);
REQUIRE(downloaded_blob.has_value());
- CHECK(*downloaded_blob->ReadContent() == content);
+
+ auto const downloaded_content = downloaded_blob->ReadContent();
+ REQUIRE(downloaded_content != nullptr);
+ CHECK(*downloaded_content == content);
}
SECTION("Small blob with wrong digest") {
@@ -97,7 +100,10 @@ TEST_CASE("ByteStream Client: Transfer single blob", "[execution_api]") {
SECTION("Download large blob") {
auto const downloaded_blob = stream.Read(instance_name, digest);
REQUIRE(downloaded_blob.has_value());
- CHECK(*downloaded_blob->ReadContent() == content);
+
+ auto const downloaded_content = downloaded_blob->ReadContent();
+ REQUIRE(downloaded_content != nullptr);
+ CHECK(*downloaded_content == content);
}
SECTION("Incrementally download large blob") {