Skip to content

Commit

Permalink
Integration test cases for logic filters
Browse files Browse the repository at this point in the history
  • Loading branch information
nitish-ks committed Jul 3, 2024
1 parent 68f64ce commit 2bb873d
Showing 1 changed file with 54 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,53 @@
provider: "{{ nios_provider }}"
register: nios_ipv6_create1


- name: configure a network ipv6 with filter option
nios_network:
network: fe80::/64
comment: this is a test comment
use_logic_filter_rules: true
state: present
provider: "{{ nios_provider }}"
register: nios_ipv6_update1

- name: configure a network ipv4 with filter option
nios_network:
network: 192.168.11.0/24
comment: this is a test comment
use_logic_filter_rules: true
state: present
provider: "{{ nios_provider }}"
register: nios_ipv4_create3

- name: update a network ipv4 with filter option
nios_network:
network: 192.168.11.0/24
comment: this is a test comment
use_logic_filter_rules: false
state: present
provider: "{{ nios_provider }}"
register: nios_ipv4_update3

- name: Re-run with no changes
nios_network:
network: 192.168.11.0/24
comment: this is a test comment
use_logic_filter_rules: false
state: present
provider: "{{ nios_provider }}"
register: nios_ipv4_update4

- name: remove an ipv4 network
nios_network:
network: 192.168.11.0/24
comment: this is a test comment
use_logic_filter_rules: false
state: absent
provider: "{{ nios_provider }}"
register: nios_ipv4_remove3


- assert:
that:
- "nios_ipv4_create1.changed"
Expand All @@ -78,3 +125,10 @@
- "not nios_ipv4_update2.changed"
- "nios_ipv4_remove1.changed"
- "not nios_ipv4_remove2.changed"
- "nios_ipv4_create3.changed"
- "nios_ipv4_update3.changed"
- "nios_ipv6_create1.changed"
- "nios_ipv6_update1.changed"
- "not nios_ipv4_update4.changed"
- "nios_ipv4_remove3.changed"

0 comments on commit 2bb873d

Please sign in to comment.