From e24c511aef522dc56a95ec053058a20e0b037bda Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Wed, 6 May 2020 09:32:10 -0400 Subject: [PATCH] Update test files for sat6 updates --- .../data/inventory/plugins/satellite6/files/foreman.yml | 7 +++++++ .../data/inventory/scripts/satellite6/files/file_reference | 4 ++-- .../tests/functional/test_inventory_source_injectors.py | 3 +-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/awx/main/tests/data/inventory/plugins/satellite6/files/foreman.yml b/awx/main/tests/data/inventory/plugins/satellite6/files/foreman.yml index 6d4faee619..a63520c2f0 100644 --- a/awx/main/tests/data/inventory/plugins/satellite6/files/foreman.yml +++ b/awx/main/tests/data/inventory/plugins/satellite6/files/foreman.yml @@ -1,5 +1,7 @@ +base_source_var: value_of_var compose: ansible_ssh_host: foreman['ip6'] | default(foreman['ip'], true) +group_prefix: foo_group_prefix keyed_groups: - key: foreman['environment_name'] | lower | regex_replace(' ', '') | regex_replace('[^A-Za-z0-9\_]', '_') | regex_replace('none', '') prefix: foreman_environment_ @@ -16,7 +18,12 @@ keyed_groups: - key: foreman['content_facet_attributes']['content_view_name'] | lower | regex_replace(' ', '') | regex_replace('[^A-Za-z0-9\_]', '_') prefix: foreman_content_view_ separator: '' +- key: '"%s-%s-%s" | format(app, tier, color)' + separator: '' +- key: '"%s-%s" | format(app, color)' + separator: '' legacy_hostvars: true plugin: theforeman.foreman.foreman want_facts: true +want_hostcollections: true want_params: true diff --git a/awx/main/tests/data/inventory/scripts/satellite6/files/file_reference b/awx/main/tests/data/inventory/scripts/satellite6/files/file_reference index efb66e492a..0e2a33d0d7 100644 --- a/awx/main/tests/data/inventory/scripts/satellite6/files/file_reference +++ b/awx/main/tests/data/inventory/scripts/satellite6/files/file_reference @@ -6,12 +6,12 @@ user = fooo password = fooo [ansible] -group_patterns = foo_group_patterns +group_patterns = ["{app}-{tier}-{color}", "{app}-{color}"] want_facts = True want_hostcollections = True group_prefix = foo_group_prefix want_ansible_ssh_host = True -rich_params = True +rich_params = False [cache] path = /tmp diff --git a/awx/main/tests/functional/test_inventory_source_injectors.py b/awx/main/tests/functional/test_inventory_source_injectors.py index c3c70d0c4a..29b798cfd7 100644 --- a/awx/main/tests/functional/test_inventory_source_injectors.py +++ b/awx/main/tests/functional/test_inventory_source_injectors.py @@ -64,11 +64,10 @@ INI_TEST_VARS = { 'tags': 'Creator:jmarshall, peanutbutter:jelly' }, 'satellite6': { - 'satellite6_group_patterns': 'foo_group_patterns', + 'satellite6_group_patterns': '["{app}-{tier}-{color}", "{app}-{color}"]', 'satellite6_group_prefix': 'foo_group_prefix', 'satellite6_want_hostcollections': True, 'satellite6_want_ansible_ssh_host': True, - 'satellite6_rich_params': True, 'satellite6_want_facts': True },