From dd23c6e397584f4bf1cf84a73d9c382a8ff81de7 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Fri, 5 Jul 2024 17:27:13 +0200 Subject: Pass HashFunction to ArtifactDigest::Create --- .../buildtool/execution_api/bazel/bazel_network.test.cpp | 16 +++++++++++----- 1 file changed, 11 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 d60af9fc..ff05eefb 100644 --- a/test/buildtool/execution_api/bazel/bazel_network.test.cpp +++ b/test/buildtool/execution_api/bazel/bazel_network.test.cpp @@ -22,6 +22,7 @@ #include "src/buildtool/common/artifact_digest.hpp" #include "src/buildtool/common/remote/retry_config.hpp" #include "src/buildtool/compatibility/compatibility.hpp" +#include "src/buildtool/crypto/hash_function.hpp" #include "src/buildtool/execution_api/bazel_msg/bazel_blob_container.hpp" #include "src/buildtool/execution_api/remote/bazel/bazel_execution_client.hpp" #include "src/buildtool/execution_api/remote/bazel/bazel_network.hpp" @@ -55,13 +56,16 @@ 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), + BazelBlob foo{ArtifactDigest::Create( + HashFunction::Instance(), content_foo), content_foo, /*is_exec=*/false}; - BazelBlob bar{ArtifactDigest::Create(content_bar), + BazelBlob bar{ArtifactDigest::Create( + HashFunction::Instance(), content_bar), content_bar, /*is_exec=*/false}; - BazelBlob baz{ArtifactDigest::Create(content_baz), + BazelBlob baz{ArtifactDigest::Create( + HashFunction::Instance(), content_baz), content_baz, /*is_exec=*/false}; @@ -113,10 +117,12 @@ 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), + BazelBlob foo{ArtifactDigest::Create( + HashFunction::Instance(), content_foo), content_foo, /*is_exec=*/false}; - BazelBlob bar{ArtifactDigest::Create(content_bar), + BazelBlob bar{ArtifactDigest::Create( + HashFunction::Instance(), content_bar), content_bar, /*is_exec=*/false}; -- cgit v1.2.3