diff options
Diffstat (limited to 'test/buildtool/execution_api/local/local_api.test.cpp')
-rw-r--r-- | test/buildtool/execution_api/local/local_api.test.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/test/buildtool/execution_api/local/local_api.test.cpp b/test/buildtool/execution_api/local/local_api.test.cpp index 164226b9..6a6b899a 100644 --- a/test/buildtool/execution_api/local/local_api.test.cpp +++ b/test/buildtool/execution_api/local/local_api.test.cpp @@ -51,8 +51,8 @@ class FactoryApi final { TEST_CASE("LocalAPI: No input, no output", "[execution_api]") { auto const storage_config = TestStorageConfig::Create(); auto const storage = Storage::Create(&storage_config.Get()); - FactoryApi api_factory( - &storage_config.Get(), &storage, &LocalExecutionConfig::Instance()); + auto const local_exec_config = SetLauncher(); + FactoryApi api_factory(&storage_config.Get(), &storage, &local_exec_config); TestNoInputNoOutput(api_factory, {}, /*is_hermetic=*/true); } @@ -60,8 +60,8 @@ TEST_CASE("LocalAPI: No input, no output", "[execution_api]") { TEST_CASE("LocalAPI: No input, create output", "[execution_api]") { auto const storage_config = TestStorageConfig::Create(); auto const storage = Storage::Create(&storage_config.Get()); - FactoryApi api_factory( - &storage_config.Get(), &storage, &LocalExecutionConfig::Instance()); + auto const local_exec_config = SetLauncher(); + FactoryApi api_factory(&storage_config.Get(), &storage, &local_exec_config); TestNoInputCreateOutput(api_factory, {}, /*is_hermetic=*/true); } @@ -69,8 +69,8 @@ TEST_CASE("LocalAPI: No input, create output", "[execution_api]") { TEST_CASE("LocalAPI: One input copied to output", "[execution_api]") { auto const storage_config = TestStorageConfig::Create(); auto const storage = Storage::Create(&storage_config.Get()); - FactoryApi api_factory( - &storage_config.Get(), &storage, &LocalExecutionConfig::Instance()); + auto const local_exec_config = SetLauncher(); + FactoryApi api_factory(&storage_config.Get(), &storage, &local_exec_config); TestOneInputCopiedToOutput(api_factory, {}, /*is_hermetic=*/true); } @@ -78,8 +78,8 @@ TEST_CASE("LocalAPI: One input copied to output", "[execution_api]") { TEST_CASE("LocalAPI: Non-zero exit code, create output", "[execution_api]") { auto const storage_config = TestStorageConfig::Create(); auto const storage = Storage::Create(&storage_config.Get()); - FactoryApi api_factory( - &storage_config.Get(), &storage, &LocalExecutionConfig::Instance()); + auto const local_exec_config = SetLauncher(); + FactoryApi api_factory(&storage_config.Get(), &storage, &local_exec_config); TestNonZeroExitCodeCreateOutput(api_factory, {}); } @@ -87,8 +87,8 @@ TEST_CASE("LocalAPI: Non-zero exit code, create output", "[execution_api]") { TEST_CASE("LocalAPI: Retrieve two identical trees to path", "[execution_api]") { auto const storage_config = TestStorageConfig::Create(); auto const storage = Storage::Create(&storage_config.Get()); - FactoryApi api_factory( - &storage_config.Get(), &storage, &LocalExecutionConfig::Instance()); + auto const local_exec_config = SetLauncher(); + FactoryApi api_factory(&storage_config.Get(), &storage, &local_exec_config); TestRetrieveTwoIdenticalTreesToPath( api_factory, {}, "two_trees", /*is_hermetic=*/true); @@ -98,8 +98,8 @@ TEST_CASE("LocalAPI: Retrieve file and symlink with same content to path", "[execution_api]") { auto const storage_config = TestStorageConfig::Create(); auto const storage = Storage::Create(&storage_config.Get()); - FactoryApi api_factory( - &storage_config.Get(), &storage, &LocalExecutionConfig::Instance()); + auto const local_exec_config = SetLauncher(); + FactoryApi api_factory(&storage_config.Get(), &storage, &local_exec_config); TestRetrieveFileAndSymlinkWithSameContentToPath( api_factory, {}, "file_and_symlink", /*is_hermetic=*/true); @@ -108,8 +108,8 @@ TEST_CASE("LocalAPI: Retrieve file and symlink with same content to path", TEST_CASE("LocalAPI: Retrieve mixed blobs and trees", "[execution_api]") { auto const storage_config = TestStorageConfig::Create(); auto const storage = Storage::Create(&storage_config.Get()); - FactoryApi api_factory( - &storage_config.Get(), &storage, &LocalExecutionConfig::Instance()); + auto const local_exec_config = SetLauncher(); + FactoryApi api_factory(&storage_config.Get(), &storage, &local_exec_config); TestRetrieveMixedBlobsAndTrees( api_factory, {}, "blobs_and_trees", /*is_hermetic=*/true); @@ -118,8 +118,8 @@ TEST_CASE("LocalAPI: Retrieve mixed blobs and trees", "[execution_api]") { TEST_CASE("LocalAPI: Create directory prior to execution", "[execution_api]") { auto const storage_config = TestStorageConfig::Create(); auto const storage = Storage::Create(&storage_config.Get()); - FactoryApi api_factory( - &storage_config.Get(), &storage, &LocalExecutionConfig::Instance()); + auto const local_exec_config = SetLauncher(); + FactoryApi api_factory(&storage_config.Get(), &storage, &local_exec_config); TestCreateDirPriorToExecution(api_factory, {}, /*is_hermetic=*/true); } |