From f7e4ebf0e2913ff1b987e40baab5c0c809e6c0de Mon Sep 17 00:00:00 2001 From: Sascha Roloff Date: Thu, 13 Oct 2022 11:39:13 +0200 Subject: Remove default value of ArtifactDigest::Create template parameter This enforces the explicit specification, which object type, either file or tree, should be used to create an artifact digest. This also avoids subtile errors at locations as in the previous commit, where files as well as trees are supposed to be handled, but digest creation mistakenly defaults to file object type. --- test/buildtool/execution_api/bazel/bazel_network.test.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'test/buildtool/execution_api/bazel/bazel_network.test.cpp') diff --git a/test/buildtool/execution_api/bazel/bazel_network.test.cpp b/test/buildtool/execution_api/bazel/bazel_network.test.cpp index 6d58d463..ccfcd695 100644 --- a/test/buildtool/execution_api/bazel/bazel_network.test.cpp +++ b/test/buildtool/execution_api/bazel/bazel_network.test.cpp @@ -30,9 +30,12 @@ TEST_CASE("Bazel network: write/read blobs", "[execution_api]") { std::string content_bar("bar"); std::string content_baz(kLargeSize, 'x'); // single larger blob - BazelBlob foo{ArtifactDigest::Create(content_foo), content_foo}; - BazelBlob bar{ArtifactDigest::Create(content_bar), content_bar}; - BazelBlob baz{ArtifactDigest::Create(content_baz), content_baz}; + BazelBlob foo{ArtifactDigest::Create(content_foo), + content_foo}; + BazelBlob bar{ArtifactDigest::Create(content_bar), + content_bar}; + BazelBlob baz{ArtifactDigest::Create(content_baz), + content_baz}; // Search blobs via digest REQUIRE(network.UploadBlobs(BlobContainer{{foo, bar, baz}})); @@ -71,8 +74,10 @@ TEST_CASE("Bazel network: read blobs with unknown size", "[execution_api]") { std::string content_foo("foo"); std::string content_bar(kLargeSize, 'x'); // single larger blob - BazelBlob foo{ArtifactDigest::Create(content_foo), content_foo}; - BazelBlob bar{ArtifactDigest::Create(content_bar), content_bar}; + BazelBlob foo{ArtifactDigest::Create(content_foo), + content_foo}; + BazelBlob bar{ArtifactDigest::Create(content_bar), + content_bar}; // Upload blobs REQUIRE(network.UploadBlobs(BlobContainer{{foo, bar}})); -- cgit v1.2.3