Skip to content

Commit

Permalink
fix: Fixed Integration Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
willguibr committed May 23, 2024
1 parent 1f2a2df commit c128884
Showing 1 changed file with 90 additions and 0 deletions.
90 changes: 90 additions & 0 deletions tests/integration/sweep.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,82 @@
---
- name: List all DLP Web Rules
zscaler.ziacloud.zia_dlp_web_rules_facts:
provider: "{{ zia_cloud }}"
register: all_dlp_rules

- name: Delete all DLP Web Rules 💥
zscaler.ziacloud.zia_dlp_web_rules:
provider: "{{ zia_cloud }}"
state: absent
name: "{{ item.name }}"
loop: "{{ all_dlp_rules.data }}"
when: all_dlp_rules.data is defined

- name: List all Cloud Firewall Rules
zscaler.ziacloud.zia_cloud_firewall_filtering_rule_facts:
provider: "{{ zia_cloud }}"
register: all_firewall_rules

- name: Delete all Cloud Firewall Rules 💥
zscaler.ziacloud.zia_cloud_firewall_filtering_rule:
provider: "{{ zia_cloud }}"
state: absent
name: "{{ item.name }}"
loop: "{{ all_firewall_rules.data }}"
when: all_firewall_rules.data is defined

- name: List all URL Filtering Rules
zscaler.ziacloud.zia_url_filtering_rule_facts:
provider: "{{ zia_cloud }}"
register: all_url_rules

- name: Delete all URL Filtering Rules 💥
zscaler.ziacloud.zia_url_filtering_rules:
provider: "{{ zia_cloud }}"
state: absent
name: "{{ item.name }}"
loop: "{{ all_url_rules.data }}"
when: all_url_rules.data is defined

- name: List all Locations
zscaler.ziacloud.zia_location_management_facts:
provider: "{{ zia_cloud }}"
register: all_locations

- name: Delete all Locations 💥
zscaler.ziacloud.zia_location_management:
provider: "{{ zia_cloud }}"
state: absent
name: "{{ item.name }}"
loop: "{{ all_locations.data }}"
when: all_locations.data is defined

- name: List all DLP Engines
zscaler.ziacloud.zia_dlp_engine_facts:
provider: "{{ zia_cloud }}"
register: all_engines

- name: Delete all DLP Engines 💥
zscaler.ziacloud.zia_dlp_engine:
provider: "{{ zia_cloud }}"
state: absent
name: "{{ item.name }}"
loop: "{{ all_engines.data }}"
when: all_engines.data is defined

- name: List all DLP Dictionaries
zscaler.ziacloud.zia_dlp_dictionaries_facts:
provider: "{{ zia_cloud }}"
register: all_dictionaries

- name: Delete all DLP Dictionaries 💥
zscaler.ziacloud.zia_dlp_dictionaries:
provider: "{{ zia_cloud }}"
state: absent
name: "{{ item.name }}"
loop: "{{ all_dictionaries.data }}"
when: all_dictionaries.data is defined

- name: List all Rule Labels
zscaler.ziacloud.zia_rule_labels_facts:
provider: "{{ zia_cloud }}"
Expand Down Expand Up @@ -54,6 +132,12 @@

- name: Set fact for each task status
ansible.builtin.set_fact:
dlp_web_rules_failed: "{{ all_dlp_rules.failed | default(false) }}"
url_filtering_rules_failed: "{{ all_url_rules.failed | default(false) }}"
firewall_rules_failed: "{{ all_firewall_rules.failed | default(false) }}"
locations_failed: "{{ all_locations.failed | default(false) }}"
dlp_engines_failed: "{{ all_engines.failed | default(false) }}"
dlp_dictionaries_failed: "{{ all_dictionaries.failed | default(false) }}"
rule_labels_failed: "{{ all_rule_labels.failed | default(false) }}"
ip_dest_groups_failed: "{{ all_ip_dest_groups.failed | default(false) }}"
ip_source_groups_failed: "{{ all_ip_source_groups.failed | default(false) }}"
Expand All @@ -64,6 +148,12 @@
sweep_successful: >-
{{
not (
firewall_rules_failed or
dlp_web_rules_failed or
url_filtering_rules_failed or
locations_failed or
dlp_engines_failed or
dlp_dictionaries_failed or
rule_labels_failed or
ip_dest_groups_failed or
ip_source_groups_failed or
Expand Down

0 comments on commit c128884

Please sign in to comment.