Skip to content

Commit

Permalink
intergration test fixes (#262)
Browse files Browse the repository at this point in the history
intergration test fixes

Reviewed-by: Polina Gubina
Reviewed-by: Anton Sidelnikov
  • Loading branch information
vladimirvshivkov authored Feb 21, 2023
1 parent 12c8558 commit 0e19dda
Show file tree
Hide file tree
Showing 68 changed files with 631 additions and 430 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
opentelekomcloud.cloud.anti_ddos_fip_statuses_info:
register: anti_ddos

- name: assert result
- name: Assert result
ansible.builtin.assert:
that:
- anti_ddos is success
Expand All @@ -19,7 +19,7 @@
status: "notConfig"
register: anti_ddos

- name: assert result
- name: Assert result
ansible.builtin.assert:
that:
- anti_ddos is success
Expand All @@ -31,7 +31,7 @@
register: anti_ddos
ignore_errors: true

- name: assert result
- name: Assert result
ansible.builtin.assert:
that:
- anti_ddos is not success
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
opentelekomcloud.cloud.anti_ddos_optional_policies_info:
register: anti_ddos_optional_policies_info

- name: assert result
- name: Assert result
ansible.builtin.assert:
that:
- anti_ddos_optional_policies_info is success
Expand Down
18 changes: 12 additions & 6 deletions tests/integration/targets/as_config/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
register: as_config_check
check_mode: true

- name: assert result
- name: Assert result
ansible.builtin.assert:
that:
- as_config_check is changed
Expand All @@ -47,7 +47,7 @@
disk_type: 'SYS'
register: as_config

- name: assert result
- name: Assert result
ansible.builtin.assert:
that:
- as_config is changed
Expand All @@ -60,16 +60,22 @@
opentelekomcloud.cloud.as_config:
scaling_configuration: "{{ config_name }}"
state: absent
register: dropped_as_config
register: removed
until: removed is not failed
ignore_errors: true
retries: 10

- name: assert result
- name: Assert result
ansible.builtin.assert:
that:
- dropped_as_config is success
- dropped_as_config is changed
- removed is success
- removed is changed

- name: Delete keypair
openstack.cloud.keypair:
name: "{{ key_name }}"
state: absent
register: removed
until: removed is not failed
ignore_errors: true
retries: 10
4 changes: 2 additions & 2 deletions tests/integration/targets/as_config_info/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
cloud: "{{ test_cloud }}"
register: auto_scale

- name: debug configs
- name: Debug configs
ansible.builtin.debug:
var: auto_scale.as_configs

- name: assert result
- name: Assert result
ansible.builtin.assert:
that:
- auto_scale is success
Expand Down
58 changes: 37 additions & 21 deletions tests/integration/targets/as_group/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
check_mode: true
register: as_group_check

- name: assert result
- name: Assert result
ansible.builtin.assert:
that:
- as_group_check is changed
Expand All @@ -94,7 +94,7 @@
router: "{{ router.router.id }}"
register: as_group

- name: assert result
- name: Assert result
ansible.builtin.assert:
that:
- as_group is success
Expand All @@ -119,7 +119,7 @@
check_mode: true
register: as_group_check

- name: assert result
- name: Assert result
ansible.builtin.assert:
that:
- as_group_check is success
Expand All @@ -133,7 +133,7 @@
max_instance_number: 10
register: as_group

- name: assert result
- name: Assert result
ansible.builtin.assert:
that:
- as_group is success
Expand All @@ -148,7 +148,7 @@
check_mode: true
register: as_group_check

- name: assert result
- name: Assert result
ansible.builtin.assert:
that:
- as_group_check is changed
Expand All @@ -163,7 +163,7 @@
timeout: 360
register: as_gr_del

- name: assert result
- name: Assert result
ansible.builtin.assert:
that:
- as_gr_del is success
Expand Down Expand Up @@ -195,7 +195,7 @@
timeout: 360
register: as_group

- name: assert result
- name: Assert result
ansible.builtin.assert:
that:
- as_group is success
Expand All @@ -206,7 +206,7 @@
scaling_group: "{{ as_group.as_group.id }}"
register: as_instances

- name: assert result
- name: Assert result
ansible.builtin.assert:
that:
- as_instances is success
Expand Down Expand Up @@ -235,36 +235,52 @@
force_delete: true
wait: true
timeout: 360
register: dropped_as_group
failed_when: "dropped_as_group is not changed"
register: removed
until: removed is not failed
ignore_errors: true
retries: 10

- name: Delete as config
opentelekomcloud.cloud.as_config:
scaling_configuration: "{{ config_name }}"
state: absent
register: dropped_as_config
failed_when: "dropped_as_config is not changed"
register: removed
until: removed is not failed
ignore_errors: true
retries: 10

- name: Delete keypair
openstack.cloud.keypair:
name: "{{ key_name }}"
state: absent
failed_when: false

- name: Drop existing router
openstack.cloud.router:
name: "{{ router.router.name }}"
state: absent
failed_when: false
register: removed
until: removed is not failed
ignore_errors: true
retries: 10

- name: Drop existing subnet
openstack.cloud.subnet:
name: "{{ subnet.subnet.name }}"
state: absent
failed_when: false
register: removed
until: removed is not failed
ignore_errors: true
retries: 10

- name: Drop existing network
openstack.cloud.network:
name: "{{ network.network.name }}"
state: absent
ignore_errors: false
register: removed
until: removed is not failed
ignore_errors: true
retries: 10

- name: Drop existing router
openstack.cloud.router:
name: "{{ router.router.name }}"
state: absent
register: removed
until: removed is not failed
ignore_errors: true
retries: 10
Loading

0 comments on commit 0e19dda

Please sign in to comment.