diff options
Diffstat (limited to 'test/buildtool/execution_engine/executor')
3 files changed, 27 insertions, 27 deletions
diff --git a/test/buildtool/execution_engine/executor/executor.test.cpp b/test/buildtool/execution_engine/executor/executor.test.cpp index 6a71f497..dcdfd2dd 100644 --- a/test/buildtool/execution_engine/executor/executor.test.cpp +++ b/test/buildtool/execution_engine/executor/executor.test.cpp @@ -273,8 +273,8 @@ TEST_CASE("Executor: Process artifact", "[executor]") { auto [config, repo_config] = CreateTest(&g, workspace_path); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; auto const local_cpp_id = ArtifactDescription::CreateLocal("local.cpp", "").Id(); @@ -360,8 +360,8 @@ TEST_CASE("Executor: Process action", "[executor]") { auto [config, repo_config] = CreateTest(&g, workspace_path); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; auto const local_cpp_id = ArtifactDescription::CreateLocal("local.cpp", "").Id(); diff --git a/test/buildtool/execution_engine/executor/executor_api.test.hpp b/test/buildtool/execution_engine/executor/executor_api.test.hpp index 4990e805..e49ab4c4 100644 --- a/test/buildtool/execution_engine/executor/executor_api.test.hpp +++ b/test/buildtool/execution_engine/executor/executor_api.test.hpp @@ -53,12 +53,12 @@ static inline void RunBlobUpload(RepositoryConfig* repo_config, SetupConfig(repo_config); auto api = factory(); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; std::string const blob = "test"; CHECK(api->Upload(ArtifactBlobContainer{{ArtifactBlob{ - ArtifactDigest{hash_function.ComputeBlobHash(blob).HexString(), + ArtifactDigest{hash_function.HashBlobData(blob).HexString(), blob.size(), /*is_tree=*/false}, blob, @@ -139,8 +139,8 @@ static inline void RunHelloWorldCompilation( RetryConfig retry_config{}; // default retry config HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; auto api = factory(); Executor runner{repo_config, @@ -273,8 +273,8 @@ static inline void RunGreeterCompilation( RetryConfig retry_config{}; // default retry config HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; auto api = factory(); Executor runner{repo_config, @@ -416,17 +416,17 @@ static inline void TestUploadAndDownloadTrees( } HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; auto foo = std::string{"foo"}; auto bar = std::string{"bar"}; auto foo_digest = - ArtifactDigest{hash_function.ComputeBlobHash(foo).HexString(), + ArtifactDigest{hash_function.HashBlobData(foo).HexString(), foo.size(), /*is_tree=*/false}; auto bar_digest = - ArtifactDigest{hash_function.ComputeBlobHash(bar).HexString(), + ArtifactDigest{hash_function.HashBlobData(bar).HexString(), bar.size(), /*is_tree=*/false}; @@ -575,8 +575,8 @@ static inline void TestRetrieveOutputDirectories( auto tmpdir = GetTestDir(); HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; auto const make_tree_id = std::string{"make_tree"}; auto const* make_tree_cmd = diff --git a/test/buildtool/execution_engine/executor/executor_api_remote_bazel.test.cpp b/test/buildtool/execution_engine/executor/executor_api_remote_bazel.test.cpp index f97de299..0e068ea9 100644 --- a/test/buildtool/execution_engine/executor/executor_api_remote_bazel.test.cpp +++ b/test/buildtool/execution_engine/executor/executor_api_remote_bazel.test.cpp @@ -42,8 +42,8 @@ TEST_CASE("Executor<BazelApi>: Upload blob", "[executor]") { RetryConfig retry_config{}; // default retry config HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; TestBlobUpload(&repo_config, [&] { return BazelApi::Ptr{new BazelApi{"remote-execution", @@ -73,8 +73,8 @@ TEST_CASE("Executor<BazelApi>: Compile hello world", "[executor]") { RetryConfig retry_config{}; // default retry config HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; TestHelloWorldCompilation( &repo_config, @@ -111,8 +111,8 @@ TEST_CASE("Executor<BazelApi>: Compile greeter", "[executor]") { RetryConfig retry_config{}; // default retry config HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; TestGreeterCompilation( &repo_config, @@ -149,8 +149,8 @@ TEST_CASE("Executor<BazelApi>: Upload and download trees", "[executor]") { RetryConfig retry_config{}; // default retry config HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; TestUploadAndDownloadTrees( &repo_config, @@ -187,8 +187,8 @@ TEST_CASE("Executor<BazelApi>: Retrieve output directories", "[executor]") { RetryConfig retry_config{}; // default retry config HashFunction const hash_function{Compatibility::IsCompatible() - ? HashFunction::JustHash::Compatible - : HashFunction::JustHash::Native}; + ? HashFunction::Type::PlainSHA256 + : HashFunction::Type::GitSHA1}; TestRetrieveOutputDirectories( &repo_config, |