From e6934e42beb88d04affef3dd485eed992640b43e Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Tue, 9 May 2017 16:15:27 +0800 Subject: [PATCH] Update ansible-test change handling and CS plugin. (#24395) * Use CloudStack simulator from Ansible repo. * Recognize cloud specific ansible-test changes. * Hide ansible-test cs notice in explain mode. --- test/runner/lib/classification.py | 10 ++++++++++ test/runner/lib/cloud/cs.py | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/test/runner/lib/classification.py b/test/runner/lib/classification.py index b6d10920fb..ffecf0d55a 100644 --- a/test/runner/lib/classification.py +++ b/test/runner/lib/classification.py @@ -378,6 +378,16 @@ class PathMapper(object): test_path = os.path.dirname(test_path) + if path.startswith('test/runner/lib/cloud/'): + cloud_target = 'cloud/%s/' % name + + if cloud_target in self.integration_targets_by_alias: + return { + 'integration': cloud_target, + } + + return all_tests() # test infrastructure, run all tests + if path.startswith('test/runner/'): return all_tests() # test infrastructure, run all tests diff --git a/test/runner/lib/cloud/cs.py b/test/runner/lib/cloud/cs.py index 99edca18b0..0d635fda7f 100644 --- a/test/runner/lib/cloud/cs.py +++ b/test/runner/lib/cloud/cs.py @@ -51,7 +51,7 @@ class CsCloudProvider(CloudProvider): """ super(CsCloudProvider, self).__init__(args, config_extension='.ini') - self.image = 'resmo/cloudstack-sim' + self.image = 'ansible/ansible:cloudstack-simulator' self.container_name = '' self.endpoint = '' self.host = '' @@ -154,7 +154,8 @@ class CsCloudProvider(CloudProvider): display.info('Starting a new CloudStack simulator docker container.', verbosity=1) docker_pull(self.args, self.image) docker_run(self.args, self.image, ['-d', '-p', '8888:8888', '--name', self.container_name]) - display.notice('The CloudStack simulator will probably be ready in 5 - 10 minutes.') + if not self.args.explain: + display.notice('The CloudStack simulator will probably be ready in 5 - 10 minutes.') container_id = get_docker_container_id()