From b3c6d3572784575811ff130d859e92b799e77bb3 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Tue, 25 Feb 2025 11:46:51 +0100 Subject: ArtifactBlob: Check access to the content --- test/buildtool/execution_api/bazel/bytestream_client.test.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 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 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") { -- cgit v1.2.3