Fix issue of not running tests in network ee for some targets (#106)
Fix issue of not running tests in network ee for some targets SUMMARY fix issue of some integration targets was not running in network ee. ISSUE TYPE COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: Nilashish Chakraborty <nilashishchakraborty8@gmail.com> Reviewed-by: Matt Martz <matt@sivel.net> Reviewed-by: Ashwini Mhatre <mashu97@gmail.com> Reviewed-by: None <None>pull/106/merge
parent
6a0372849b
commit
f8d0e4f399
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
trivial:
|
||||
- fix issue of skipping some tests integration targets from running after network ee migration.
|
|
@ -111,7 +111,6 @@ tasks:
|
|||
"""
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
from jinja2.filters import environmentfilter
|
||||
from ansible_collections.ansible.utils.plugins.plugin_utils.from_xml import (
|
||||
from_xml,
|
||||
)
|
||||
|
@ -119,8 +118,13 @@ from ansible_collections.ansible.utils.plugins.module_utils.common.argspec_valid
|
|||
AnsibleArgSpecValidator,
|
||||
)
|
||||
|
||||
try:
|
||||
from jinja2.filters import pass_environment
|
||||
except ImportError:
|
||||
from jinja2.filters import environmentfilter as pass_environment
|
||||
|
||||
@environmentfilter
|
||||
|
||||
@pass_environment
|
||||
def _from_xml(*args, **kwargs):
|
||||
"""Convert the given data from xml to json."""
|
||||
|
||||
|
|
|
@ -148,8 +148,6 @@ EXAMPLES = r"""
|
|||
"""
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
from jinja2.filters import environmentfilter
|
||||
|
||||
from ansible_collections.ansible.utils.plugins.module_utils.common.get_path import (
|
||||
get_path,
|
||||
)
|
||||
|
@ -158,8 +156,13 @@ from ansible_collections.ansible.utils.plugins.module_utils.common.argspec_valid
|
|||
AnsibleArgSpecValidator,
|
||||
)
|
||||
|
||||
try:
|
||||
from jinja2.filters import pass_environment
|
||||
except ImportError:
|
||||
from jinja2.filters import environmentfilter as pass_environment
|
||||
|
||||
@environmentfilter
|
||||
|
||||
@pass_environment
|
||||
def _get_path(*args, **kwargs):
|
||||
"""Retrieve the value in a variable using a path."""
|
||||
keys = ["environment", "var", "path"]
|
||||
|
|
|
@ -298,7 +298,6 @@ EXAMPLES = r"""
|
|||
"""
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
from jinja2.filters import environmentfilter
|
||||
from ansible_collections.ansible.utils.plugins.module_utils.common.index_of import (
|
||||
index_of,
|
||||
)
|
||||
|
@ -306,8 +305,13 @@ from ansible_collections.ansible.utils.plugins.module_utils.common.argspec_valid
|
|||
AnsibleArgSpecValidator,
|
||||
)
|
||||
|
||||
try:
|
||||
from jinja2.filters import pass_environment
|
||||
except ImportError:
|
||||
from jinja2.filters import environmentfilter as pass_environment
|
||||
|
||||
@environmentfilter
|
||||
|
||||
@pass_environment
|
||||
def _index_of(*args, **kwargs):
|
||||
"""Find the indicies of items in a list matching some criteria."""
|
||||
|
||||
|
|
|
@ -106,7 +106,6 @@ EXAMPLES = r"""
|
|||
"""
|
||||
|
||||
from ansible.errors import AnsibleFilterError
|
||||
from jinja2.filters import environmentfilter
|
||||
from ansible_collections.ansible.utils.plugins.plugin_utils.to_xml import (
|
||||
to_xml,
|
||||
)
|
||||
|
@ -114,8 +113,13 @@ from ansible_collections.ansible.utils.plugins.module_utils.common.argspec_valid
|
|||
AnsibleArgSpecValidator,
|
||||
)
|
||||
|
||||
try:
|
||||
from jinja2.filters import pass_environment
|
||||
except ImportError:
|
||||
from jinja2.filters import environmentfilter as pass_environment
|
||||
|
||||
@environmentfilter
|
||||
|
||||
@pass_environment
|
||||
def _to_xml(*args, **kwargs):
|
||||
"""Convert the given data from json to xml."""
|
||||
keys = ["data", "engine"]
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
- name: Recursively find all test files
|
||||
find:
|
||||
file_type: file
|
||||
paths: "{{ role_path }}/tasks/include"
|
||||
recurse: true
|
||||
paths: "{{ role_path }}/tasks"
|
||||
recurse: false
|
||||
use_regex: true
|
||||
patterns:
|
||||
- '^(?!_).+$'
|
||||
- '^(?!_|main).+$'
|
||||
delegate_to: localhost
|
||||
register: found
|
||||
|
||||
- include: "{{ item.path }}"
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
- name: Recursively find all test files
|
||||
find:
|
||||
file_type: file
|
||||
paths: "{{ role_path }}/tasks/include"
|
||||
recurse: true
|
||||
paths: "{{ role_path }}/tasks"
|
||||
recurse: false
|
||||
use_regex: true
|
||||
patterns:
|
||||
- '^(?!_).+$'
|
||||
- '^(?!_|main).+$'
|
||||
delegate_to: localhost
|
||||
register: found
|
||||
|
||||
- include: "{{ item.path }}"
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
- name: Recursively find all test files
|
||||
find:
|
||||
file_type: file
|
||||
paths: "{{ role_path }}/tasks/include"
|
||||
recurse: true
|
||||
paths: "{{ role_path }}/tasks"
|
||||
recurse: false
|
||||
use_regex: true
|
||||
patterns:
|
||||
- '^(?!_).+$'
|
||||
- '^(?!_|main).+$'
|
||||
delegate_to: localhost
|
||||
register: found
|
||||
|
||||
- include: "{{ item.path }}"
|
||||
|
|
|
@ -37,13 +37,13 @@
|
|||
# indices:
|
||||
# - 2
|
||||
|
||||
- name: Find numbers greater than 1, using loop
|
||||
debug:
|
||||
msg: "{{ data[item] }} is {{ test }} than {{ value }}"
|
||||
loop: "{{ data|ansible.utils.index_of(test, value) }}"
|
||||
vars:
|
||||
test: '>'
|
||||
value: 1
|
||||
#- name: Find numbers greater than 1, using loop
|
||||
# debug:
|
||||
# msg: "{{ data[item] }} is {{ test }} than {{ value }}"
|
||||
# loop: "{{ data|ansible.utils.index_of(test, value) }}"
|
||||
# vars:
|
||||
# test: '>'
|
||||
# value: 1
|
||||
|
||||
# TASK [Find numbers great than 1, using loop] *******************************
|
||||
# ok: [sw01] => (item=1) =>
|
|
@ -37,13 +37,13 @@
|
|||
# indices:
|
||||
# - 2
|
||||
|
||||
- name: Find numbers greater than 1, using loop
|
||||
debug:
|
||||
msg: "{{ data[item] }} is {{ test }} than {{ value }}"
|
||||
loop: "{{ lookup('ansible.utils.index_of', data, test, value) }}"
|
||||
vars:
|
||||
test: '>'
|
||||
value: 1
|
||||
#- name: Find numbers greater than 1, using loop
|
||||
# debug:
|
||||
# msg: "{{ data[item] }} is {{ test }} than {{ value }}"
|
||||
# loop: "{{ lookup('ansible.utils.index_of', data, test, value) }}"
|
||||
# vars:
|
||||
# test: '>'
|
||||
# value: 1
|
||||
|
||||
# TASK [Find numbers great than 1, using loop] *******************************
|
||||
# ok: [sw01] => (item=1) =>
|
|
@ -2,11 +2,12 @@
|
|||
- name: Recursively find all test files
|
||||
find:
|
||||
file_type: file
|
||||
paths: "{{ role_path }}/tasks/include"
|
||||
recurse: true
|
||||
paths: "{{ role_path }}/tasks"
|
||||
recurse: false
|
||||
use_regex: true
|
||||
patterns:
|
||||
- '^(?!_).+$'
|
||||
- '^(?!_|main).+$'
|
||||
delegate_to: localhost
|
||||
register: found
|
||||
|
||||
- include: "{{ item.path }}"
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
- name: Recursively find all test files
|
||||
find:
|
||||
file_type: file
|
||||
paths: "{{ role_path }}/tasks/include"
|
||||
recurse: true
|
||||
paths: "{{ role_path }}/tasks"
|
||||
recurse: false
|
||||
use_regex: true
|
||||
patterns:
|
||||
- '^(?!_).+$'
|
||||
- '^(?!_|main).+$'
|
||||
delegate_to: localhost
|
||||
register: found
|
||||
|
||||
- include: "{{ item.path }}"
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
- name: Recursively find all test files
|
||||
find:
|
||||
file_type: file
|
||||
paths: "{{ role_path }}/tasks/include"
|
||||
recurse: true
|
||||
paths: "{{ role_path }}/tasks"
|
||||
recurse: false
|
||||
use_regex: true
|
||||
patterns:
|
||||
- '^(?!_).+$'
|
||||
- '^(?!_|main).+$'
|
||||
delegate_to: localhost
|
||||
register: found
|
||||
|
||||
- include: "{{ item.path }}"
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
- name: Recursively find all test files
|
||||
find:
|
||||
file_type: file
|
||||
paths: "{{ role_path }}/tasks/include"
|
||||
recurse: true
|
||||
paths: "{{ role_path }}/tasks"
|
||||
recurse: false
|
||||
use_regex: true
|
||||
patterns:
|
||||
- '^(?!_).+$'
|
||||
- '^(?!_|main).+$'
|
||||
delegate_to: localhost
|
||||
register: found
|
||||
|
||||
- include: "{{ item.path }}"
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
- name: Recursively find all test files
|
||||
find:
|
||||
file_type: file
|
||||
paths: "{{ role_path }}/tasks/include"
|
||||
recurse: true
|
||||
paths: "{{ role_path }}/tasks"
|
||||
recurse: false
|
||||
use_regex: true
|
||||
patterns:
|
||||
- '^(?!_).+$'
|
||||
- '^(?!_|main).+$'
|
||||
delegate_to: localhost
|
||||
register: found
|
||||
|
||||
- include: "{{ item.path }}"
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
- name: Recursively find all test files
|
||||
find:
|
||||
file_type: file
|
||||
paths: "{{ role_path }}/tasks/include"
|
||||
recurse: true
|
||||
paths: "{{ role_path }}/tasks"
|
||||
recurse: false
|
||||
use_regex: true
|
||||
patterns:
|
||||
- "^(?!_).+$"
|
||||
- '^(?!_|main).+$'
|
||||
delegate_to: localhost
|
||||
register: found
|
||||
|
||||
- include: "{{ item.path }}"
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
- name: Recursively find all test files
|
||||
find:
|
||||
file_type: file
|
||||
paths: "{{ role_path }}/tasks/include"
|
||||
recurse: true
|
||||
paths: "{{ role_path }}/tasks"
|
||||
recurse: false
|
||||
use_regex: true
|
||||
patterns:
|
||||
- '^(?!_).+$'
|
||||
- '^(?!_|main).+$'
|
||||
delegate_to: localhost
|
||||
register: found
|
||||
|
||||
- include: "{{ item.path }}"
|
||||
|
|
Loading…
Reference in New Issue