diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2022-06-14 18:41:53 +0200 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2022-06-20 15:23:02 +0200 |
commit | 1ea0b1d9ff98d8c44658046019c94f5952ad5c66 (patch) | |
tree | a4f8b95b249f55f6e5c042319f65e0a50d1785a3 /test/buildtool/execution_engine/executor | |
parent | 7bfe61079b0355d260b977193e3b05be969ca068 (diff) | |
download | justbuild-1ea0b1d9ff98d8c44658046019c94f5952ad5c66.tar.gz |
Crypto: Add and use set of globally used hash functions
Diffstat (limited to 'test/buildtool/execution_engine/executor')
-rwxr-xr-x | test/buildtool/execution_engine/executor/executor_api.test.hpp | 12 |
1 files changed, 8 insertions, 4 deletions
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(); |