mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Deprecate tests used as filters (#32361)
* 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
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
- name: verify network setup
|
||||
assert:
|
||||
that:
|
||||
- net|success
|
||||
- net is successful
|
||||
|
||||
- name: public ip address setup
|
||||
cs_ip_address:
|
||||
@@ -19,7 +19,7 @@
|
||||
- name: verify public ip address setup
|
||||
assert:
|
||||
that:
|
||||
- ip_address|success
|
||||
- ip_address is successful
|
||||
|
||||
- name: set ip address as fact
|
||||
set_fact:
|
||||
@@ -35,7 +35,7 @@
|
||||
- name: verify setup
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw is successful
|
||||
|
||||
- name: setup 5300
|
||||
cs_firewall:
|
||||
@@ -52,7 +52,7 @@
|
||||
- name: verify setup
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw is successful
|
||||
|
||||
- name: setup all
|
||||
cs_firewall:
|
||||
@@ -65,7 +65,7 @@
|
||||
- name: verify setup
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw is successful
|
||||
|
||||
- name: test fail if missing params
|
||||
action: cs_firewall
|
||||
@@ -74,7 +74,7 @@
|
||||
- name: verify results of fail if missing params
|
||||
assert:
|
||||
that:
|
||||
- fw|failed
|
||||
- fw is failed
|
||||
- "fw.msg == 'one of the following is required: ip_address, network'"
|
||||
|
||||
- name: test fail if missing params
|
||||
@@ -86,7 +86,7 @@
|
||||
- name: verify results of fail if missing params
|
||||
assert:
|
||||
that:
|
||||
- fw|failed
|
||||
- fw is failed
|
||||
- "fw.msg == \"missing required argument for protocol 'tcp': start_port or end_port\""
|
||||
|
||||
- name: test fail if missing params network egress
|
||||
@@ -98,7 +98,7 @@
|
||||
- name: verify results of fail if missing params ip_address
|
||||
assert:
|
||||
that:
|
||||
- fw|failed
|
||||
- fw is failed
|
||||
- "fw.msg == 'one of the following is required: ip_address, network'"
|
||||
|
||||
- name: test present firewall rule ingress 80 in check mode
|
||||
@@ -111,8 +111,8 @@
|
||||
- name: verify results of present firewall rule ingress 80 in check mode
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
|
||||
- name: test present firewall rule ingress 80
|
||||
cs_firewall:
|
||||
@@ -123,8 +123,8 @@
|
||||
- name: verify results of present firewall rule ingress 80
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
- fw.cidr == "0.0.0.0/0"
|
||||
- fw.cidrs == [ '0.0.0.0/0' ]
|
||||
- fw.ip_address == "{{ cs_firewall_ip_address }}"
|
||||
@@ -142,8 +142,8 @@
|
||||
- name: verify results of present firewall rule ingress 80 idempotence
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- not fw|changed
|
||||
- fw is successful
|
||||
- fw is not changed
|
||||
- fw.cidr == "0.0.0.0/0"
|
||||
- fw.cidrs == [ '0.0.0.0/0' ]
|
||||
- fw.ip_address == "{{ cs_firewall_ip_address }}"
|
||||
@@ -167,8 +167,8 @@
|
||||
- name: verify results of present firewall rule ingress 5300 in check mode
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
|
||||
- name: test present firewall rule ingress 5300
|
||||
cs_firewall:
|
||||
@@ -184,8 +184,8 @@
|
||||
- name: verify results of present firewall rule ingress 5300
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
- fw.cidr == "1.2.3.0/24,4.5.6.0/24"
|
||||
- fw.cidrs == [ '1.2.3.0/24', '4.5.6.0/24' ]
|
||||
- fw.ip_address == "{{ cs_firewall_ip_address }}"
|
||||
@@ -208,8 +208,8 @@
|
||||
- name: verify results of present firewall rule ingress 5300 idempotence
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- not fw|changed
|
||||
- fw is successful
|
||||
- fw is not changed
|
||||
- fw.cidr == "1.2.3.0/24,4.5.6.0/24"
|
||||
- fw.cidrs == [ '1.2.3.0/24', '4.5.6.0/24' ]
|
||||
- fw.ip_address == "{{ cs_firewall_ip_address }}"
|
||||
@@ -229,8 +229,8 @@
|
||||
- name: verify results of present firewall rule egress all in check mode
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
|
||||
- name: test present firewall rule egress all
|
||||
cs_firewall:
|
||||
@@ -242,8 +242,8 @@
|
||||
- name: verify results of present firewall rule egress all
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
- fw.cidr == "0.0.0.0/0"
|
||||
- fw.cidrs == [ '0.0.0.0/0' ]
|
||||
- fw.network == "{{ cs_firewall_network }}"
|
||||
@@ -260,8 +260,8 @@
|
||||
- name: verify results of present firewall rule egress all idempotence
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- not fw|changed
|
||||
- fw is successful
|
||||
- fw is not changed
|
||||
- fw.cidr == "0.0.0.0/0"
|
||||
- fw.network == "{{ cs_firewall_network }}"
|
||||
- fw.protocol == "all"
|
||||
@@ -278,8 +278,8 @@
|
||||
- name: verify results of absent firewall rule ingress 80 in check mode
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
- fw.cidr == "0.0.0.0/0"
|
||||
- fw.cidrs == [ '0.0.0.0/0' ]
|
||||
- fw.ip_address == "{{ cs_firewall_ip_address }}"
|
||||
@@ -298,8 +298,8 @@
|
||||
- name: verify results of absent firewall rule ingress 80
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
- fw.cidr == "0.0.0.0/0"
|
||||
- fw.cidrs == [ '0.0.0.0/0' ]
|
||||
- fw.ip_address == "{{ cs_firewall_ip_address }}"
|
||||
@@ -318,8 +318,8 @@
|
||||
- name: verify results of absent firewall rule ingress 80 idempotence
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- not fw|changed
|
||||
- fw is successful
|
||||
- fw is not changed
|
||||
|
||||
- name: test absent firewall rule ingress 5300 in check mode
|
||||
cs_firewall:
|
||||
@@ -337,8 +337,8 @@
|
||||
- name: verify results of absent firewall rule ingress 5300 in check mode
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
- fw.cidr == "1.2.3.0/24,4.5.6.0/24"
|
||||
- fw.cidrs == [ '1.2.3.0/24', '4.5.6.0/24' ]
|
||||
- fw.ip_address == "{{ cs_firewall_ip_address }}"
|
||||
@@ -362,8 +362,8 @@
|
||||
- name: verify results of absent firewall rule ingress 5300
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
- fw.cidr == "1.2.3.0/24,4.5.6.0/24"
|
||||
- fw.cidrs == [ '1.2.3.0/24', '4.5.6.0/24' ]
|
||||
- fw.ip_address == "{{ cs_firewall_ip_address }}"
|
||||
@@ -387,8 +387,8 @@
|
||||
- name: verify results of absent firewall rule ingress 5300 idempotence
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- not fw|changed
|
||||
- fw is successful
|
||||
- fw is not changed
|
||||
|
||||
- name: test absent firewall rule egress all in check mode
|
||||
cs_firewall:
|
||||
@@ -402,8 +402,8 @@
|
||||
- name: verify results of absent firewall rule egress all in check mode
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
- fw.cidr == "0.0.0.0/0"
|
||||
- fw.cidrs == [ '0.0.0.0/0' ]
|
||||
- fw.network == "{{ cs_firewall_network }}"
|
||||
@@ -421,8 +421,8 @@
|
||||
- name: verify results of absent firewall rule egress all
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- fw|changed
|
||||
- fw is successful
|
||||
- fw is changed
|
||||
- fw.cidr == "0.0.0.0/0"
|
||||
- fw.cidrs == [ '0.0.0.0/0' ]
|
||||
- fw.network == "{{ cs_firewall_network }}"
|
||||
@@ -440,8 +440,8 @@
|
||||
- name: verify results of absent firewall rule egress all idempotence
|
||||
assert:
|
||||
that:
|
||||
- fw|success
|
||||
- not fw|changed
|
||||
- fw is successful
|
||||
- fw is not changed
|
||||
|
||||
- name: network cleanup
|
||||
cs_network:
|
||||
@@ -452,4 +452,4 @@
|
||||
- name: verify network cleanup
|
||||
assert:
|
||||
that:
|
||||
- net|success
|
||||
- net is successful
|
||||
|
||||
Reference in New Issue
Block a user