From 9ab21a7f3d7e349b05ceaad5862d7e72a6d7e7b4 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Mon, 1 Jul 2024 14:56:32 +0200 Subject: Pass Auth::TLS instance to BazelApi and ServeApi --- .../build_engine/target_map/target_map.test.cpp | 32 ++++++++++++++++------ 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'test/buildtool/build_engine/target_map/target_map.test.cpp') diff --git a/test/buildtool/build_engine/target_map/target_map.test.cpp b/test/buildtool/build_engine/target_map/target_map.test.cpp index d02aea8e..7bb8ab3e 100644 --- a/test/buildtool/build_engine/target_map/target_map.test.cpp +++ b/test/buildtool/build_engine/target_map/target_map.test.cpp @@ -99,7 +99,9 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, "simple targets", "[target_map]") { auto serve_config = TestServeConfig::ReadServeConfigFromEnvironment(); REQUIRE(serve_config); - ApiBundle const apis{nullptr, RemoteExecutionConfig::RemoteAddress()}; + ApiBundle const apis{/*repo_config=*/nullptr, + /*authentication=*/nullptr, + RemoteExecutionConfig::RemoteAddress()}; auto serve = ServeApi::Create(*serve_config, &apis); AnalyseContext ctx{.repo_config = &repo_config, .target_cache = &Storage::Instance().TargetCache(), @@ -542,7 +544,9 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, auto serve_config = TestServeConfig::ReadServeConfigFromEnvironment(); REQUIRE(serve_config); - ApiBundle const apis{nullptr, RemoteExecutionConfig::RemoteAddress()}; + ApiBundle const apis{/*repo_config=*/nullptr, + /*authentication=*/nullptr, + RemoteExecutionConfig::RemoteAddress()}; auto serve = ServeApi::Create(*serve_config, &apis); AnalyseContext ctx{.repo_config = &repo_config, .target_cache = &Storage::Instance().TargetCache(), @@ -630,7 +634,9 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, auto serve_config = TestServeConfig::ReadServeConfigFromEnvironment(); REQUIRE(serve_config); - ApiBundle const apis{nullptr, RemoteExecutionConfig::RemoteAddress()}; + ApiBundle const apis{/*repo_config=*/nullptr, + /*authentication=*/nullptr, + RemoteExecutionConfig::RemoteAddress()}; auto serve = ServeApi::Create(*serve_config, &apis); AnalyseContext ctx{.repo_config = &repo_config, .target_cache = &Storage::Instance().TargetCache(), @@ -728,7 +734,9 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, "built-in rules", "[target_map]") { auto serve_config = TestServeConfig::ReadServeConfigFromEnvironment(); REQUIRE(serve_config); - ApiBundle const apis{nullptr, RemoteExecutionConfig::RemoteAddress()}; + ApiBundle const apis{/*repo_config=*/nullptr, + /*authentication=*/nullptr, + RemoteExecutionConfig::RemoteAddress()}; auto serve = ServeApi::Create(*serve_config, &apis); AnalyseContext ctx{.repo_config = &repo_config, .target_cache = &Storage::Instance().TargetCache(), @@ -936,7 +944,9 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, "target reference", "[target_map]") { auto serve_config = TestServeConfig::ReadServeConfigFromEnvironment(); REQUIRE(serve_config); - ApiBundle const apis{nullptr, RemoteExecutionConfig::RemoteAddress()}; + ApiBundle const apis{/*repo_config=*/nullptr, + /*authentication=*/nullptr, + RemoteExecutionConfig::RemoteAddress()}; auto serve = ServeApi::Create(*serve_config, &apis); AnalyseContext ctx{.repo_config = &repo_config, .target_cache = &Storage::Instance().TargetCache(), @@ -1077,7 +1087,9 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, "trees", "[target_map]") { auto serve_config = TestServeConfig::ReadServeConfigFromEnvironment(); REQUIRE(serve_config); - ApiBundle const apis{nullptr, RemoteExecutionConfig::RemoteAddress()}; + ApiBundle const apis{/*repo_config=*/nullptr, + /*authentication=*/nullptr, + RemoteExecutionConfig::RemoteAddress()}; auto serve = ServeApi::Create(*serve_config, &apis); AnalyseContext ctx{.repo_config = &repo_config, .target_cache = &Storage::Instance().TargetCache(), @@ -1184,7 +1196,9 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, auto serve_config = TestServeConfig::ReadServeConfigFromEnvironment(); REQUIRE(serve_config); - ApiBundle const apis{nullptr, RemoteExecutionConfig::RemoteAddress()}; + ApiBundle const apis{/*repo_config=*/nullptr, + /*authentication=*/nullptr, + RemoteExecutionConfig::RemoteAddress()}; auto serve = ServeApi::Create(*serve_config, &apis); AnalyseContext ctx{.repo_config = &repo_config, .target_cache = &Storage::Instance().TargetCache(), @@ -1348,7 +1362,9 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, "wrong arguments", "[target_map]") { auto serve_config = TestServeConfig::ReadServeConfigFromEnvironment(); REQUIRE(serve_config); - ApiBundle const apis{nullptr, RemoteExecutionConfig::RemoteAddress()}; + ApiBundle const apis{/*repo_config=*/nullptr, + /*authentication=*/nullptr, + RemoteExecutionConfig::RemoteAddress()}; auto serve = ServeApi::Create(*serve_config, &apis); AnalyseContext ctx{.repo_config = &repo_config, .target_cache = &Storage::Instance().TargetCache(), -- cgit v1.2.3