postgresql: move CI tests of *_tablespace, *_membership, *_idx to separate targets (#62575)

* postgresql: move CI tests of *_tablespace, *_membership, *_idx to separate targets

* postgresql: move CI tests of *_tablespace, *_membership, *_idx to separate targets, change formatting
This commit is contained in:
Andrey Klychkov 2019-09-19 16:57:45 +03:00 committed by John R Barker
parent 7047b66d34
commit 7b3d8431dd
16 changed files with 59 additions and 18 deletions

View file

@ -2,9 +2,7 @@ destructive
shippable/posix/group4
postgresql_db
postgresql_ext
postgresql_idx
postgresql_lang
postgresql_membership
postgresql_pg_hba
postgresql_privs
postgresql_publication
@ -13,6 +11,5 @@ postgresql_sequence
postgresql_set
postgresql_slot
postgresql_table
postgresql_tablespace
postgresql_user
skip/osx

View file

@ -34,12 +34,6 @@
# Verify different session_role scenarios
- session_role.yml
# Test postgresql_idx module
- postgresql_idx.yml
# Test postgresql_tablespace module
- postgresql_tablespace.yml
# Test postgresql_db module, specific options
- postgresql_db.yml
@ -49,9 +43,6 @@
# Test postgresql_schema module
- postgresql_schema.yml
# Test postgresql_membership module
- postgresql_membership.yml
# Test postgresql_table module
- postgresql_table.yml

View file

@ -16,13 +16,37 @@
# Start tablespace option tests:
block:
# create tablespace for tests
- name: postgresql_db_tablespace - Create tablespace
<<: *task_parameters
# Preparation for tests.
- name: postgresql_db - drop dir for test tablespace
become: yes
become_user: root
file:
path: "{{ tblspc_location }}"
state: absent
ignore_errors: yes
- name: postgresql_db - disable selinux
become: yes
become_user: root
shell: setenforce 0
ignore_errors: yes
- name: postgresql_db - create dir for test tablespace
become: yes
become_user: root
file:
path: "{{ tblspc_location }}"
state: directory
owner: "{{ pg_user }}"
group: "{{ pg_user }}"
mode: 0700
# Create tablespace:
- name: postgresql_db_ - create a new tablespace
postgresql_tablespace:
<<: *pg_parameters
login_db: postgres
name: "{{ db_tablespace }}"
name: "{{ db_tablespace }}"
location: "{{ tblspc_location }}"
# Check mode for DB creation with tablespace option:

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -0,0 +1,2 @@
---
test_tablespace_path: "/ssd"

View file

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

View file

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

View file

@ -5,7 +5,7 @@
- name: postgresql_tablespace - drop dir for test tablespace
become: yes
file:
path: /ssd
path: "{{ test_tablespace_path }}"
state: absent
ignore_errors: yes
@ -17,7 +17,7 @@
- name: postgresql_tablespace - create dir for test tablespace
become: yes
file:
path: /ssd
path: "{{ test_tablespace_path }}"
state: directory
owner: "{{ pg_user }}"
group: "{{ pg_user }}"