Skip to content

Commit

Permalink
dev: fix to security group rules functional test
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudguruab committed May 13, 2024
1 parent 56934b0 commit c8300d6
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 48 deletions.
11 changes: 0 additions & 11 deletions os_migrate/roles/validate_data_dir/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,6 @@
msg: No resource files found.
when: resource_files_result.files | count < 1

- name: print contents of each resource file
ansible.builtin.slurp:
src: "{{ item.path }}"
loop: "{{ resource_files_result.files }}"
register: file_contents

- name: display file contents
ansible.builtin.debug:
msg: "{{ item.item.path }} contents:\n\n{{ item.content | b64decode }}"
loop: "{{ file_contents.results }}"

- name: validate resource files
os_migrate.os_migrate.validate_resource_files:
paths: "{{ resource_files_result.files | map(attribute='path') | list }}"
Expand Down
12 changes: 1 addition & 11 deletions tests/func/tasks/tenant/clean/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,7 @@
tags:
- always

- name: Include security group rule tasks
ansible.builtin.include_tasks: security_group_rule.yml
args:
apply:
tags:
- test_security_group_rule
- test_clean
tags:
- always

- name: Include security group tasks
- name: Include security group and security group rules tasks
ansible.builtin.include_tasks: security_group.yml
args:
apply:
Expand Down
2 changes: 1 addition & 1 deletion tests/func/tasks/tenant/clean/security_group.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- name: remove osm_security_group
- name: remove osm_security_group and security group rules
openstack.cloud.security_group:
auth: "{{ item }}"
name: osm_security_group
Expand Down
8 changes: 0 additions & 8 deletions tests/func/tasks/tenant/clean/security_group_rule.yml

This file was deleted.

10 changes: 1 addition & 9 deletions tests/func/tasks/tenant/seed/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,14 @@
- test_subnet
tags: always

- name: Include security group tasks
- name: Include security group tasks and security group rules
ansible.builtin.include_tasks: security_group.yml
args:
apply:
tags:
- test_security_group
tags: always

- name: Include security group rule tasks
ansible.builtin.include_tasks: security_group_rule.yml
args:
apply:
tags:
- test_security_group_rule
tags: always

- name: Include router tasks
ansible.builtin.include_tasks: router.yml
args:
Expand Down
9 changes: 9 additions & 0 deletions tests/func/tasks/tenant/seed/security_group.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@
state: present
name: osm_security_group
description: OSM security group

- name: Create security group rule
openstack.cloud.security_group_rule:
auth: "{{ os_migrate_src_auth }}"
security_group: osm_security_group
protocol: tcp
port_range_min: 80
port_range_max: 80
remote_ip_prefix: 0.0.0.0/0
8 changes: 0 additions & 8 deletions tests/func/tasks/tenant/seed/security_group_rule.yml

This file was deleted.

0 comments on commit c8300d6

Please sign in to comment.