From 44fe3fc6b0c5c50c884bfdcca64c0f89ba1f0b11 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 28 Feb 2019 13:22:58 +0100 Subject: [PATCH] better test output --- molecule/gce-centos-7/create.yml | 8 ++++++++ molecule/gce-centos-7/tests/test_default.py | 3 +++ 2 files changed, 11 insertions(+) diff --git a/molecule/gce-centos-7/create.yml b/molecule/gce-centos-7/create.yml index 3f4bc6c..c9e316a 100644 --- a/molecule/gce-centos-7/create.yml +++ b/molecule/gce-centos-7/create.yml @@ -20,6 +20,8 @@ project_id: "{{ lookup('env', 'GCE_PROJECT_ID') }}" register: server with_items: "{{ molecule_yml.platforms }}" + loop_control: + label: "{{ item.name }} - {{ item.machine_type }}" async: 7200 poll: 0 @@ -30,6 +32,8 @@ until: gce_jobs.finished retries: 300 with_items: "{{ server.results }}" + loop_control: + label: "{{ item.name }} - {{ item.machine_type }}" # Mandatory configuration for Molecule to function. @@ -42,6 +46,8 @@ 'port': "{{ ssh_port }}", 'identity_file': "{{ ssh_identity_file }}", } with_items: "{{ gce_jobs.results }}" + loop_control: + label: "{{ item.instance_data[0].name }} - {{ item.instance_data[0].machine_type }}" register: instance_config_dict when: server.changed | bool @@ -63,3 +69,5 @@ search_regex: SSH delay: 10 with_items: "{{ lookup('file', molecule_instance_config) | molecule_from_yaml }}" + loop_control: + label: "{{ item.instance }}" diff --git a/molecule/gce-centos-7/tests/test_default.py b/molecule/gce-centos-7/tests/test_default.py index d64a9ef..45ddb66 100644 --- a/molecule/gce-centos-7/tests/test_default.py +++ b/molecule/gce-centos-7/tests/test_default.py @@ -2,6 +2,9 @@ import os import testinfra.utils.ansible_runner +import warnings +warnings.filterwarnings("ignore", category=DeprecationWarning) + testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')