postgresql: move CI tests of *_owner, *_info, *_ping, *_query to separate targets (#62500)

pull/62515/head
Andrey Klychkov 5 years ago committed by John R Barker
parent 05ef39551a
commit b87b359df5

@ -3,15 +3,11 @@ shippable/posix/group4
postgresql_db
postgresql_ext
postgresql_idx
postgresql_info
postgresql_lang
postgresql_membership
postgresql_owner
postgresql_pg_hba
postgresql_ping
postgresql_privs
postgresql_publication
postgresql_query
postgresql_schema
postgresql_sequence
postgresql_set

@ -37,9 +37,6 @@
# Test postgresql_idx module
- postgresql_idx.yml
# Test postgresql_query module
- postgresql_query.yml
# Test postgresql_tablespace module
- postgresql_tablespace.yml
@ -49,9 +46,6 @@
# Test postgresql_privs
- postgresql_privs.yml
# Test postgresql_info module
- postgresql_info.yml
# Test postgresql_schema module
- postgresql_schema.yml
@ -61,19 +55,11 @@
# Test postgresql_table module
- postgresql_table.yml
# Test postgresql_owner module
- postgresql_owner.yml
# Test postgres_pg_hba module
- postgresql_pg_hba.yml
loop_control:
loop_var: loop_item
# Test postgresql_ping module
- import_tasks: postgresql_ping.yml
vars:
db_name_nonexist: fake_db
# Test default_privs with target_role
- import_tasks: test_target_role.yml
when: postgres_version_resp.stdout is version('9.1', '>=')

@ -1,3 +1,3 @@
---
dependencies:
- setup_postgresql_db
- setup_postgresql_db

@ -1,3 +1,3 @@
# Initial CI test for postgresql_copy module
# Initial CI tests of postgresql_copy module
- import_tasks: postgresql_copy_initial.yml
when: postgres_version_resp.stdout is version('9.4', '>=')

@ -0,0 +1,4 @@
destructive
shippable/posix/group4
postgresql_info
skip/osx

@ -0,0 +1,3 @@
---
dependencies:
- setup_postgresql_db

@ -0,0 +1,2 @@
# Initial CI tests of postgresql_info module
- import_tasks: postgresql_info_initial.yml

@ -0,0 +1,4 @@
destructive
shippable/posix/group4
postgresql_owner
skip/osx

@ -0,0 +1,3 @@
---
dependencies:
- setup_postgresql_db

@ -0,0 +1,2 @@
# Initial CI tests of postgresql_owner module
- import_tasks: postgresql_owner_initial.yml

@ -90,6 +90,29 @@
query: "CREATE MATERIALIZED VIEW test_mat_view AS SELECT * FROM my_table"
when: postgres_version_resp.stdout is version('9.4', '>=')
# Create test tablespace:
- name: postgresql_owner - drop dir for test tablespace
become: yes
file:
path: "{{ test_tablespace_path }}"
state: absent
ignore_errors: yes
- name: postgresql_owner - disable selinux
become: yes
shell: setenforce 0
ignore_errors: yes
- name: postgresql_owner - create dir for test tablespace
become: yes
file:
path: "{{ test_tablespace_path }}"
state: directory
owner: "{{ pg_user }}"
group: "{{ pg_user }}"
mode: 0700
ignore_errors: yes
# Create test tablespace
- name: postgresql_owner - create a new tablespace called acme and set bob as an its owner
become_user: "{{ pg_user }}"
@ -99,7 +122,7 @@
login_user: "{{ pg_user }}"
name: acme
owner: alice
location: /ssd
location: "{{ test_tablespace_path }}"
################
# Do main tests:

@ -0,0 +1,4 @@
destructive
shippable/posix/group4
postgresql_ping
skip/osx

@ -0,0 +1,3 @@
---
dependencies:
- setup_postgresql_db

@ -0,0 +1,4 @@
# Initial CI tests of postgresql_ping module
- import_tasks: postgresql_ping_initial.yml
vars:
db_name_nonexist: fake_db

@ -0,0 +1,4 @@
destructive
shippable/posix/group4
postgresql_query
skip/osx

@ -0,0 +1,3 @@
---
dependencies:
- setup_postgresql_db

@ -0,0 +1,2 @@
# Initial CI tests of postgresql_query module
- import_tasks: postgresql_query_initial.yml
Loading…
Cancel
Save