diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-16 12:26:13 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-22 17:02:34 +0200 |
commit | 8f3a09e42d25f533e9d9a007125a7661cef3b653 (patch) | |
tree | cd384b19f0a1c95c0d01b3b43d6d93968518cbbc /test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp | |
parent | 7caf8d3fc009c34b6a1484eac4cbd1b697a2e3c4 (diff) | |
download | justbuild-8f3a09e42d25f533e9d9a007125a7661cef3b653.tar.gz |
Remove singleton calls to HashFunction in tests
Diffstat (limited to 'test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp')
-rw-r--r-- | test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp b/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp index 498b0492..86cee26a 100644 --- a/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp +++ b/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp @@ -48,8 +48,11 @@ TEST_CASE("Bazel internals: CAS Client", "[execution_api]") { SECTION("Valid digest and blob") { // digest of "test" - auto digest = ArtifactDigest::Create<ObjectType::File>( - HashFunction::Instance(), content); + HashFunction const hash_function{ + Compatibility::IsCompatible() ? HashFunction::JustHash::Compatible + : HashFunction::JustHash::Native}; + auto digest = + ArtifactDigest::Create<ObjectType::File>(hash_function, content); // Valid blob BazelBlob blob{digest, content, /*is_exec=*/false}; |