mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Cleanup and enhancements for ansible-test. (#37142)
* Fix type hint typos. * Add one-time cloud env setup after delegation. * Add generate_password to util. * Add username/password support to HttpClient. * Avoid pip requirement for ansible-test shell. * Support provisioning Tower instances.
This commit is contained in:
@@ -140,6 +140,9 @@ def install_command_requirements(args):
|
||||
if not args.requirements:
|
||||
return
|
||||
|
||||
if isinstance(args, ShellConfig):
|
||||
return
|
||||
|
||||
packages = []
|
||||
|
||||
if isinstance(args, TestConfig):
|
||||
@@ -720,6 +723,9 @@ def command_integration_filtered(args, targets, all_targets):
|
||||
tries -= 1
|
||||
|
||||
try:
|
||||
if cloud_environment:
|
||||
cloud_environment.setup_once()
|
||||
|
||||
run_setup_targets(args, test_dir, target.setup_once, all_targets_dict, setup_targets_executed, False)
|
||||
|
||||
start_time = time.time()
|
||||
@@ -808,12 +814,12 @@ def command_integration_filtered(args, targets, all_targets):
|
||||
|
||||
def run_setup_targets(args, test_dir, target_names, targets_dict, targets_executed, always):
|
||||
"""
|
||||
:param args: IntegrationConfig
|
||||
:param test_dir: str
|
||||
:param target_names: list[str]
|
||||
:param targets_dict: dict[str, IntegrationTarget]
|
||||
:param targets_executed: set[str]
|
||||
:param always: bool
|
||||
:type args: IntegrationConfig
|
||||
:type test_dir: str
|
||||
:type target_names: list[str]
|
||||
:type targets_dict: dict[str, IntegrationTarget]
|
||||
:type targets_executed: set[str]
|
||||
:type always: bool
|
||||
"""
|
||||
for target_name in target_names:
|
||||
if not always and target_name in targets_executed:
|
||||
|
||||
Reference in New Issue
Block a user