diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-07-29 11:13:08 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-07-30 12:10:06 +0200 |
commit | b393090c220da61dd1c197adfac42dc47ad74f8a (patch) | |
tree | 72fb8ea9e5a9a4f9c01017c0601720b98909e3a8 /test/buildtool/graph_traverser | |
parent | 6089297787902f9a38a678e2ffdf639e779a1594 (diff) | |
download | justbuild-b393090c220da61dd1c197adfac42dc47ad74f8a.tar.gz |
ApiBundle: Use a creator method instead of constructor
This will allow for ApiBundle to be used together with the TestApi
implementation of IExecutionApi in tests.
Also rename CreateRemote method to MakeRemote in order to remove
any semantical confusion.
Diffstat (limited to 'test/buildtool/graph_traverser')
-rw-r--r-- | test/buildtool/graph_traverser/graph_traverser.test.hpp | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/test/buildtool/graph_traverser/graph_traverser.test.hpp b/test/buildtool/graph_traverser/graph_traverser.test.hpp index 314d7bd6..6618e5bf 100644 --- a/test/buildtool/graph_traverser/graph_traverser.test.hpp +++ b/test/buildtool/graph_traverser/graph_traverser.test.hpp @@ -186,7 +186,8 @@ class TestProject { .retry_config = &retry_config, .exec_config = remote_config}; - ApiBundle const apis{&local_context, &remote_context, p.GetRepoConfig()}; + auto const apis = + ApiBundle::Create(&local_context, &remote_context, p.GetRepoConfig()); GraphTraverser const gt{clargs.gtargs, p.GetRepoConfig(), @@ -264,7 +265,8 @@ class TestProject { .retry_config = &retry_config, .exec_config = remote_config}; - ApiBundle const apis{&local_context, &remote_context, p.GetRepoConfig()}; + auto const apis = + ApiBundle::Create(&local_context, &remote_context, p.GetRepoConfig()); GraphTraverser const gt{clargs.gtargs, p.GetRepoConfig(), @@ -312,7 +314,8 @@ class TestProject { .retry_config = &retry_config, .exec_config = remote_config}; - ApiBundle const apis{&local_context, &remote_context, p.GetRepoConfig()}; + auto const apis = + ApiBundle::Create(&local_context, &remote_context, p.GetRepoConfig()); GraphTraverser const gt{clargs.gtargs, p.GetRepoConfig(), @@ -379,8 +382,8 @@ class TestProject { .retry_config = &retry_config, .exec_config = remote_config}; - ApiBundle const apis{ - &local_context, &remote_context, full_hello_world.GetRepoConfig()}; + auto const apis = ApiBundle::Create( + &local_context, &remote_context, full_hello_world.GetRepoConfig()); GraphTraverser const gt_upload{clargs_update_cpp.gtargs, full_hello_world.GetRepoConfig(), @@ -453,7 +456,8 @@ static void TestBlobsUploadedAndUsed( .retry_config = &retry_config, .exec_config = remote_config}; - ApiBundle const apis{&local_context, &remote_context, p.GetRepoConfig()}; + auto const apis = + ApiBundle::Create(&local_context, &remote_context, p.GetRepoConfig()); GraphTraverser gt{clargs.gtargs, p.GetRepoConfig(), @@ -509,7 +513,8 @@ static void TestEnvironmentVariablesSetAndUsed( .retry_config = &retry_config, .exec_config = remote_config}; - ApiBundle const apis{&local_context, &remote_context, p.GetRepoConfig()}; + auto const apis = + ApiBundle::Create(&local_context, &remote_context, p.GetRepoConfig()); GraphTraverser gt{clargs.gtargs, p.GetRepoConfig(), @@ -565,7 +570,8 @@ static void TestTreesUsed( .retry_config = &retry_config, .exec_config = remote_config}; - ApiBundle const apis{&local_context, &remote_context, p.GetRepoConfig()}; + auto const apis = + ApiBundle::Create(&local_context, &remote_context, p.GetRepoConfig()); GraphTraverser gt{clargs.gtargs, p.GetRepoConfig(), @@ -621,7 +627,8 @@ static void TestNestedTreesUsed( .retry_config = &retry_config, .exec_config = remote_config}; - ApiBundle const apis{&local_context, &remote_context, p.GetRepoConfig()}; + auto const apis = + ApiBundle::Create(&local_context, &remote_context, p.GetRepoConfig()); GraphTraverser gt{clargs.gtargs, p.GetRepoConfig(), @@ -676,7 +683,8 @@ static void TestFlakyHelloWorldDetected( .retry_config = &retry_config, .exec_config = remote_config}; - ApiBundle const apis{&local_context, &remote_context, p.GetRepoConfig()}; + auto const apis = + ApiBundle::Create(&local_context, &remote_context, p.GetRepoConfig()); { auto clargs = p.CmdLineArgs("_entry_points_ctimes"); |