From 1ea0b1d9ff98d8c44658046019c94f5952ad5c66 Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Tue, 14 Jun 2022 18:41:53 +0200 Subject: Crypto: Add and use set of globally used hash functions --- .../execution_engine/executor/executor_api.test.hpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'test/buildtool/execution_engine/executor') diff --git a/test/buildtool/execution_engine/executor/executor_api.test.hpp b/test/buildtool/execution_engine/executor/executor_api.test.hpp index a3026cfa..f36a89b8 100755 --- a/test/buildtool/execution_engine/executor/executor_api.test.hpp +++ b/test/buildtool/execution_engine/executor/executor_api.test.hpp @@ -26,8 +26,10 @@ static inline void RunBlobUpload(ApiFactory const& factory) { SetupConfig(); auto api = factory(); std::string const blob = "test"; - CHECK(api->Upload(BlobContainer{ - {BazelBlob{ArtifactDigest{ComputeHash(blob), blob.size()}, blob}}})); + CHECK(api->Upload(BlobContainer{{BazelBlob{ + ArtifactDigest{HashFunction::ComputeBlobHash(blob).HexString(), + blob.size()}, + blob}}})); } [[nodiscard]] static inline auto GetTestDir() -> std::filesystem::path { @@ -269,8 +271,10 @@ static inline void TestUploadAndDownloadTrees(ApiFactory const& factory, auto foo = std::string{"foo"}; auto bar = std::string{"bar"}; - auto foo_digest = ArtifactDigest{ComputeHash(foo), foo.size()}; - auto bar_digest = ArtifactDigest{ComputeHash(bar), bar.size()}; + auto foo_digest = ArtifactDigest{ + HashFunction::ComputeBlobHash(foo).HexString(), foo.size()}; + auto bar_digest = ArtifactDigest{ + HashFunction::ComputeBlobHash(bar).HexString(), bar.size()}; // upload blobs auto api = factory(); -- cgit v1.2.3