mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 22:33:25 +00:00
Fix integration tests to support remote hosts.
This commit is contained in:
@@ -16,15 +16,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
- name: get the jinja2 version
|
||||
shell: python -c 'import jinja2; print(jinja2.__version__)'
|
||||
register: jinja2_version
|
||||
delegate_to: localhost
|
||||
changed_when: no
|
||||
|
||||
- debug:
|
||||
msg: "Jinja version: {{ jinja2_version.stdout }}, Python version: {{ ansible_facts.python_version }}"
|
||||
|
||||
|
||||
## user add
|
||||
|
||||
@@ -183,14 +174,7 @@
|
||||
- user_test1.results is defined
|
||||
- user_test1.results | length == 5
|
||||
|
||||
- name: validate changed results for testcase 1 (jinja >= 2.6)
|
||||
assert:
|
||||
that:
|
||||
- user_test1.results | map(attribute='changed') | unique | list == [False]
|
||||
- user_test1.results | map(attribute='state') | unique | list == ['present']
|
||||
when: jinja2_version.stdout is version('2.6', '>=')
|
||||
|
||||
- name: validate changed results for testcase 1 (jinja < 2.6)
|
||||
- name: validate changed results for testcase 1
|
||||
assert:
|
||||
that:
|
||||
- "user_test1.results[0] is not changed"
|
||||
@@ -203,7 +187,6 @@
|
||||
- "user_test1.results[2]['state'] == 'present'"
|
||||
- "user_test1.results[3]['state'] == 'present'"
|
||||
- "user_test1.results[4]['state'] == 'present'"
|
||||
when: jinja2_version.stdout is version('2.6', '<')
|
||||
|
||||
|
||||
## user remove
|
||||
|
||||
Reference in New Issue
Block a user