From eb8d824360ce262502c5fc06072ebf07ea278bec Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Fri, 5 Jul 2024 17:18:19 +0200 Subject: Pass LocalExecutionConfig to LocalAction and LocalApi --- .../execution_api/local/local_execution.test.cpp | 25 +++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'test/buildtool/execution_api/local/local_execution.test.cpp') diff --git a/test/buildtool/execution_api/local/local_execution.test.cpp b/test/buildtool/execution_api/local/local_execution.test.cpp index 4c2e309c..e8489b33 100644 --- a/test/buildtool/execution_api/local/local_execution.test.cpp +++ b/test/buildtool/execution_api/local/local_execution.test.cpp @@ -63,7 +63,10 @@ TEST_CASE("LocalExecution: No input, no output", "[execution_api]") { auto const storage = Storage::Create(&storage_config.Get()); RepositoryConfig repo_config{}; - auto api = LocalApi(&storage_config.Get(), &storage, &repo_config); + auto api = LocalApi(&storage_config.Get(), + &storage, + &LocalExecutionConfig::Instance(), + &repo_config); std::string test_content("test"); std::vector const cmdline = {"echo", "-n", test_content}; @@ -111,7 +114,10 @@ TEST_CASE("LocalExecution: No input, no output, env variables used", auto const storage = Storage::Create(&storage_config.Get()); RepositoryConfig repo_config{}; - auto api = LocalApi(&storage_config.Get(), &storage, &repo_config); + auto api = LocalApi(&storage_config.Get(), + &storage, + &LocalExecutionConfig::Instance(), + &repo_config); std::string test_content("test from env var"); std::vector const cmdline = { @@ -162,7 +168,10 @@ TEST_CASE("LocalExecution: No input, create output", "[execution_api]") { auto const storage = Storage::Create(&storage_config.Get()); RepositoryConfig repo_config{}; - auto api = LocalApi(&storage_config.Get(), &storage, &repo_config); + auto api = LocalApi(&storage_config.Get(), + &storage, + &LocalExecutionConfig::Instance(), + &repo_config); std::string test_content("test"); auto test_digest = ArtifactDigest::Create(test_content); @@ -219,7 +228,10 @@ TEST_CASE("LocalExecution: One input copied to output", "[execution_api]") { auto const storage = Storage::Create(&storage_config.Get()); RepositoryConfig repo_config{}; - auto api = LocalApi(&storage_config.Get(), &storage, &repo_config); + auto api = LocalApi(&storage_config.Get(), + &storage, + &LocalExecutionConfig::Instance(), + &repo_config); std::string test_content("test"); auto test_digest = ArtifactDigest::Create(test_content); @@ -289,7 +301,10 @@ TEST_CASE("LocalExecution: Cache failed action's result", "[execution_api]") { auto const storage = Storage::Create(&storage_config.Get()); RepositoryConfig repo_config{}; - auto api = LocalApi(&storage_config.Get(), &storage, &repo_config); + auto api = LocalApi(&storage_config.Get(), + &storage, + &LocalExecutionConfig::Instance(), + &repo_config); auto flag = GetTestDir() / "flag"; std::vector const cmdline = { -- cgit v1.2.3