diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-05 17:27:13 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-22 17:01:13 +0200 |
commit | dd23c6e397584f4bf1cf84a73d9c382a8ff81de7 (patch) | |
tree | 0f0f600a4674a03da42c07f4ea016ff3c2dc578e /test/buildtool/execution_api/bazel/bazel_network.test.cpp | |
parent | beb3faa6956b9bfd58d4ea6644a9b2987409aaba (diff) | |
download | justbuild-dd23c6e397584f4bf1cf84a73d9c382a8ff81de7.tar.gz |
Pass HashFunction to ArtifactDigest::Create
Diffstat (limited to 'test/buildtool/execution_api/bazel/bazel_network.test.cpp')
-rw-r--r-- | test/buildtool/execution_api/bazel/bazel_network.test.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
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<ObjectType::File>(content_foo), + BazelBlob foo{ArtifactDigest::Create<ObjectType::File>( + HashFunction::Instance(), content_foo), content_foo, /*is_exec=*/false}; - BazelBlob bar{ArtifactDigest::Create<ObjectType::File>(content_bar), + BazelBlob bar{ArtifactDigest::Create<ObjectType::File>( + HashFunction::Instance(), content_bar), content_bar, /*is_exec=*/false}; - BazelBlob baz{ArtifactDigest::Create<ObjectType::File>(content_baz), + BazelBlob baz{ArtifactDigest::Create<ObjectType::File>( + 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<ObjectType::File>(content_foo), + BazelBlob foo{ArtifactDigest::Create<ObjectType::File>( + HashFunction::Instance(), content_foo), content_foo, /*is_exec=*/false}; - BazelBlob bar{ArtifactDigest::Create<ObjectType::File>(content_bar), + BazelBlob bar{ArtifactDigest::Create<ObjectType::File>( + HashFunction::Instance(), content_bar), content_bar, /*is_exec=*/false}; |