Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 3 additions & 29 deletions tests/integration/targets/cs_account/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
---
- name: setup
cs_account: name={{ cs_resource_prefix }}_user state=absent
cs_account:
name: "{{ cs_resource_prefix }}_username"
state: absent
register: acc
- name: verify setup
assert:
that:
- acc is successful

- name: test fail if missing name
action: cs_account
Expand Down Expand Up @@ -42,7 +40,6 @@
- name: verify results of create account in check mode
assert:
that:
- acc is successful
- acc is changed

- name: test create user account
Expand All @@ -58,7 +55,6 @@
- name: verify results of create account
assert:
that:
- acc is successful
- acc is changed
- acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com"
Expand All @@ -79,7 +75,6 @@
- name: verify results of create account idempotence
assert:
that:
- acc is successful
- acc is not changed
- acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com"
Expand All @@ -96,7 +91,6 @@
- name: verify results of lock user account in check mode
assert:
that:
- acc is successful
- acc is changed
- acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com"
Expand All @@ -112,7 +106,6 @@
- name: verify results of lock user account
assert:
that:
- acc is successful
- acc is changed
- acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com"
Expand All @@ -128,7 +121,6 @@
- name: verify results of lock user account idempotence
assert:
that:
- acc is successful
- acc is not changed
- acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com"
Expand All @@ -145,7 +137,6 @@
- name: verify results of disable user account in check mode
assert:
that:
- acc is successful
- acc is changed
- acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com"
Expand All @@ -161,7 +152,6 @@
- name: verify results of disable user account
assert:
that:
- acc is successful
- acc is changed
- acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com"
Expand All @@ -177,7 +167,6 @@
- name: verify results of disable user account idempotence
assert:
that:
- acc is successful
- acc is not changed
- acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com"
Expand All @@ -194,7 +183,6 @@
- name: verify results of lock disabled user account in check mode
assert:
that:
- acc is successful
- acc is changed
- acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com"
Expand All @@ -210,7 +198,6 @@
- name: verify results of lock disabled user account
assert:
that:
- acc is successful
- acc is changed
- acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com"
Expand All @@ -226,7 +213,6 @@
- name: verify results of lock disabled user account idempotence
assert:
that:
- acc is successful
- acc is not changed
- acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com"
Expand All @@ -243,7 +229,6 @@
- name: verify results of enable user account in check mode
assert:
that:
- acc is successful
- acc is changed
- acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com"
Expand All @@ -259,7 +244,6 @@
- name: verify results of enable user account
assert:
that:
- acc is successful
- acc is changed
- acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com"
Expand All @@ -275,7 +259,6 @@
- name: verify results of enable user account idempotence
assert:
that:
- acc is successful
- acc is not changed
- acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com"
Expand All @@ -292,7 +275,6 @@
- name: verify results of remove user account in check mode
assert:
that:
- acc is successful
- acc is changed
- acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com"
Expand All @@ -308,7 +290,6 @@
- name: verify results of remove user account
assert:
that:
- acc is successful
- acc is changed
- acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com"
Expand All @@ -324,7 +305,6 @@
- name: verify results of remove user account idempotence
assert:
that:
- acc is successful
- acc is not changed

- name: test create user disabled account
Expand All @@ -341,7 +321,6 @@
- name: verify results of create disabled account
assert:
that:
- acc is successful
- acc is changed
- acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com"
Expand All @@ -357,7 +336,6 @@
- name: verify results of remove disabled user account
assert:
that:
- acc is successful
- acc is changed
- acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com"
Expand All @@ -379,7 +357,6 @@
- name: verify results of create locked account
assert:
that:
- acc is successful
- acc is changed
- acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com"
Expand All @@ -395,7 +372,6 @@
- name: verify results of remove locked user account
assert:
that:
- acc is successful
- acc is changed
- acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com"
Expand All @@ -417,7 +393,6 @@
- name: verify results of create unlocked/enabled account
assert:
that:
- acc is successful
- acc is changed
- acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com"
Expand All @@ -433,7 +408,6 @@
- name: verify results of remove unlocked/enabled user account
assert:
that:
- acc is successful
- acc is changed
- acc.name == "{{ cs_resource_prefix }}_user"
- acc.network_domain == "example.com"
Expand Down
37 changes: 0 additions & 37 deletions tests/integration/targets/cs_firewall/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
network_domain: example.com
zone: "{{ cs_common_zone_adv }}"
register: net
- name: verify network setup
assert:
that:
- net is successful

- name: setup instance to get network in implementation state
cs_instance:
Expand Down Expand Up @@ -48,11 +44,6 @@
ip_address: "{{ cs_firewall_ip_address }}"
zone: "{{ cs_common_zone_adv }}"
state: absent
register: fw
- name: verify setup
assert:
that:
- fw is successful

- name: setup 5300
cs_firewall:
Expand All @@ -65,11 +56,6 @@
- 4.5.6.0/24
zone: "{{ cs_common_zone_adv }}"
state: absent
register: fw
- name: verify setup
assert:
that:
- fw is successful

- name: setup all
cs_firewall:
Expand All @@ -78,11 +64,6 @@
type: egress
zone: "{{ cs_common_zone_adv }}"
state: absent
register: fw
- name: verify setup
assert:
that:
- fw is successful

- name: test fail if missing params
action: cs_firewall
Expand Down Expand Up @@ -128,7 +109,6 @@
- name: verify results of present firewall rule ingress 80 in check mode
assert:
that:
- fw is successful
- fw is changed

- name: test present firewall rule ingress 80
Expand All @@ -140,7 +120,6 @@
- name: verify results of present firewall rule ingress 80
assert:
that:
- fw is successful
- fw is changed
- fw.cidr == "0.0.0.0/0"
- fw.cidrs == [ '0.0.0.0/0' ]
Expand All @@ -159,7 +138,6 @@
- name: verify results of present firewall rule ingress 80 idempotence
assert:
that:
- fw is successful
- fw is not changed
- fw.cidr == "0.0.0.0/0"
- fw.cidrs == [ '0.0.0.0/0' ]
Expand All @@ -184,7 +162,6 @@
- name: verify results of present firewall rule ingress 5300 in check mode
assert:
that:
- fw is successful
- fw is changed

- name: test present firewall rule ingress 5300
Expand All @@ -201,7 +178,6 @@
- name: verify results of present firewall rule ingress 5300
assert:
that:
- 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' ]
Expand All @@ -225,7 +201,6 @@
- name: verify results of present firewall rule ingress 5300 idempotence
assert:
that:
- 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' ]
Expand All @@ -246,7 +221,6 @@
- name: verify results of present firewall rule egress all in check mode
assert:
that:
- fw is successful
- fw is changed

- name: test present firewall rule egress all
Expand All @@ -259,7 +233,6 @@
- name: verify results of present firewall rule egress all
assert:
that:
- fw is successful
- fw is changed
- fw.cidr == "0.0.0.0/0" or fw.cidr == "10.1.1.0/24"
- fw.cidrs == [ '0.0.0.0/0' ] or fw.cidrs == [ '10.1.1.0/24' ]
Expand All @@ -277,7 +250,6 @@
- name: verify results of present firewall rule egress all idempotence
assert:
that:
- fw is successful
- fw is not changed
- fw.cidr == "0.0.0.0/0" or fw.cidr == "10.1.1.0/24"
- fw.cidrs == [ '0.0.0.0/0' ] or fw.cidrs == [ '10.1.1.0/24' ]
Expand All @@ -296,7 +268,6 @@
- name: verify results of absent firewall rule ingress 80 in check mode
assert:
that:
- fw is successful
- fw is changed
- fw.cidr == "0.0.0.0/0"
- fw.cidrs == [ '0.0.0.0/0' ]
Expand All @@ -316,7 +287,6 @@
- name: verify results of absent firewall rule ingress 80
assert:
that:
- fw is successful
- fw is changed
- fw.cidr == "0.0.0.0/0"
- fw.cidrs == [ '0.0.0.0/0' ]
Expand All @@ -336,7 +306,6 @@
- name: verify results of absent firewall rule ingress 80 idempotence
assert:
that:
- fw is successful
- fw is not changed

- name: test absent firewall rule ingress 5300 in check mode
Expand All @@ -355,7 +324,6 @@
- name: verify results of absent firewall rule ingress 5300 in check mode
assert:
that:
- 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' ]
Expand All @@ -380,7 +348,6 @@
- name: verify results of absent firewall rule ingress 5300
assert:
that:
- 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' ]
Expand All @@ -405,7 +372,6 @@
- name: verify results of absent firewall rule ingress 5300 idempotence
assert:
that:
- fw is successful
- fw is not changed

- name: test absent firewall rule egress all in check mode
Expand All @@ -420,7 +386,6 @@
- name: verify results of absent firewall rule egress all in check mode
assert:
that:
- fw is successful
- fw is changed
- fw.cidr == "0.0.0.0/0" or fw.cidr == "10.1.1.0/24"
- fw.cidrs == [ '0.0.0.0/0' ] or fw.cidrs == [ '10.1.1.0/24' ]
Expand All @@ -439,7 +404,6 @@
- name: verify results of absent firewall rule egress all
assert:
that:
- fw is successful
- fw is changed
- fw.cidr == "0.0.0.0/0" or fw.cidr == "10.1.1.0/24"
- fw.cidrs == [ '0.0.0.0/0' ] or fw.cidrs == [ '10.1.1.0/24' ]
Expand All @@ -458,7 +422,6 @@
- name: verify results of absent firewall rule egress all idempotence
assert:
that:
- fw is successful
- fw is not changed

- name: cleanup instance
Expand Down
Loading