mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
4fe08441be
* Warn on tests used as filters * Update docs, add aliases for tests that fit more gramatically with test syntax * Fix rst formatting * Add successful filter, alias of success * Remove renamed_deprecation, it was overkill * Make directory alias for is_dir * Update tests to use proper jinja test syntax * Update additional documentation, living outside of YAML files, to reflect proper jinja test syntax * Add conversion script, porting guide updates, and changelog updates * Update newly added uses of tests as filters * No underscore variable * Convert recent tests as filter changes to win_stat * Fix some changes related to rebasing a few integration tests * Make tests_as_filters_warning explicitly accept the name of the test, instead of inferring the name * Add test for tests_as_filters_warning * Update tests as filters in newly added/modified tests * Address recent changes to several integration tests * Address recent changes in cs_vpc
101 lines
2.8 KiB
YAML
101 lines
2.8 KiB
YAML
# test code for the slurp module when using winrm connection
|
|
# (c) 2015, Chris Church <cchurch@ansible.com>
|
|
|
|
# This file is part of Ansible
|
|
#
|
|
# Ansible is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# Ansible is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
- name: remove test group if it exists
|
|
win_group:
|
|
name: "{{test_win_group_name}}"
|
|
state: absent
|
|
|
|
- name: create test group with missing name parameter
|
|
win_group:
|
|
description: "{{test_win_group_description}}"
|
|
register: win_group_create_noname
|
|
ignore_errors: true
|
|
|
|
- name: check create result without name parameter
|
|
assert:
|
|
that:
|
|
- "win_group_create_noname is failed"
|
|
|
|
- name: create test group with invalid state parameter
|
|
win_group:
|
|
name: "{{test_win_group_name}}"
|
|
state: "unknown"
|
|
register: win_group_create_invalid_state
|
|
ignore_errors: true
|
|
|
|
- name: check create result with invalid state parameter
|
|
assert:
|
|
that:
|
|
- "win_group_create_invalid_state is failed"
|
|
|
|
- name: create test group
|
|
win_group:
|
|
name: "{{test_win_group_name}}"
|
|
description: "{{test_win_group_description}}"
|
|
register: win_group_create
|
|
|
|
- name: check create group results
|
|
assert:
|
|
that:
|
|
- "win_group_create is changed"
|
|
|
|
- name: create test group again with same options
|
|
win_group:
|
|
name: "{{test_win_group_name}}"
|
|
description: "{{test_win_group_description}}"
|
|
state: "present"
|
|
register: win_group_create_again
|
|
|
|
- name: check create group again results
|
|
assert:
|
|
that:
|
|
- "win_group_create_again is not changed"
|
|
|
|
- name: create test group again but change description
|
|
win_group:
|
|
name: "{{test_win_group_name}}"
|
|
description: "{{test_win_group_description}} updated"
|
|
register: win_group_create_new_description
|
|
|
|
- name: check create group results after updating description
|
|
assert:
|
|
that:
|
|
- "win_group_create_new_description is changed"
|
|
|
|
- name: remove test group
|
|
win_group:
|
|
name: "{{test_win_group_name}}"
|
|
state: absent
|
|
register: win_group_remove
|
|
|
|
- name: check remove group result
|
|
assert:
|
|
that:
|
|
- "win_group_remove is changed"
|
|
|
|
- name: remove test group again
|
|
win_group:
|
|
name: "{{test_win_group_name}}"
|
|
state: absent
|
|
register: win_group_remove_again
|
|
|
|
- name: check remove group again result
|
|
assert:
|
|
that:
|
|
- "win_group_remove_again is not changed"
|