From 4d9f475ce7f9b82b1220b6d9b133579c807403a3 Mon Sep 17 00:00:00 2001 From: Till Maas Date: Fri, 16 Nov 2018 13:49:28 +0100 Subject: [PATCH] Tests: Add names for other provider tasks/playbooks --- tests/ensure_non_running_provider.py | 9 ++++++--- tests/tests_bridge_other_provider.yml | 7 +++++-- tests/tests_default_other_provider.yml | 7 +++++-- tests/tests_ethernet_other_provider.yml | 7 +++++-- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/tests/ensure_non_running_provider.py b/tests/ensure_non_running_provider.py index 6038ab3..a83a9b2 100755 --- a/tests/ensure_non_running_provider.py +++ b/tests/ensure_non_running_provider.py @@ -18,13 +18,16 @@ IGNORE = ["tests_unit.yml", "tests_helpers-and-asserts.yml"] OTHER_PLAYBOOK = """ # SPDX-License-Identifier: BSD-3-Clause --- -- hosts: all +- name: Run playbook '{tests_playbook}' with non-default provider + hosts: all vars: network_provider_current: tasks: # required for the code to set network_provider_current - - service_facts: - - set_fact: + - name: Get service facts + service_facts: + - name: Set network provider + set_fact: network_provider: "{{{{ 'initscripts' if network_provider_current == 'nm' else 'nm' }}}}" - import_playbook: "{tests_playbook}" diff --git a/tests/tests_bridge_other_provider.yml b/tests/tests_bridge_other_provider.yml index e907b0f..efec9bd 100644 --- a/tests/tests_bridge_other_provider.yml +++ b/tests/tests_bridge_other_provider.yml @@ -1,7 +1,10 @@ - hosts: all + name: Run playbook 'tests_bridge.yml' with non-default provider tasks: - - service_facts: null - - set_fact: + - name: Get service facts + service_facts: null + - name: Set network provider + set_fact: network_provider: '{{ ''initscripts'' if network_provider_current == ''nm'' else ''nm'' }}' vars: diff --git a/tests/tests_default_other_provider.yml b/tests/tests_default_other_provider.yml index 34498d2..88f4089 100644 --- a/tests/tests_default_other_provider.yml +++ b/tests/tests_default_other_provider.yml @@ -1,7 +1,10 @@ - hosts: all + name: Run playbook 'tests_default.yml' with non-default provider tasks: - - service_facts: null - - set_fact: + - name: Get service facts + service_facts: null + - name: Set network provider + set_fact: network_provider: '{{ ''initscripts'' if network_provider_current == ''nm'' else ''nm'' }}' vars: diff --git a/tests/tests_ethernet_other_provider.yml b/tests/tests_ethernet_other_provider.yml index 779f993..1cf4acb 100644 --- a/tests/tests_ethernet_other_provider.yml +++ b/tests/tests_ethernet_other_provider.yml @@ -1,7 +1,10 @@ - hosts: all + name: Run playbook 'tests_ethernet.yml' with non-default provider tasks: - - service_facts: null - - set_fact: + - name: Get service facts + service_facts: null + - name: Set network provider + set_fact: network_provider: '{{ ''initscripts'' if network_provider_current == ''nm'' else ''nm'' }}' vars: