postgresql: move CI tests to separate targets (#62773)

pull/62782/head
Andrey Klychkov 6 years ago committed by Felix Fontein
parent 278398555d
commit 6be46b59fa

@ -1,9 +1,6 @@
destructive
shippable/posix/group4
postgresql_db
postgresql_lang
postgresql_pg_hba
postgresql_privs
postgresql_schema
postgresql_user
skip/osx

@ -23,12 +23,6 @@
# Test postgresql_privs
- postgresql_privs.yml
# Test postgresql_schema module
- postgresql_schema.yml
# Test postgres_pg_hba module
- postgresql_pg_hba.yml
loop_control:
loop_var: loop_item
@ -36,15 +30,6 @@
- import_tasks: test_target_role.yml
when: postgres_version_resp.stdout is version('9.1', '>=')
# Test postgresql_lang module.
# To implement tests, it needs to install some additional packages
# that may cause problems on different distributions,
# so I restricted the tests using CentOS because the results
# depend only on Postgres version
# (CentOS 6 repo contains the oldest PG version in these tests - 9.0):
- import_tasks: postgresql_lang.yml
when: ansible_distribution == 'CentOS'
# dump/restore tests per format
# ============================================================
- include_tasks: state_dump_restore.yml

@ -1,4 +1,3 @@
destructive
shippable/posix/group4
postgresql_copy
skip/osx

@ -1,4 +1,3 @@
destructive
shippable/posix/group4
postgresql_ext
skip/osx

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

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

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

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

@ -0,0 +1,3 @@
# Initial CI tests of postgresql_lang module
- import_tasks: postgresql_lang_initial.yml
when: ansible_distribution == 'CentOS'

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

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

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

@ -0,0 +1,23 @@
---
pg_hba_test_ips:
- contype: local
users: 'all,postgres,test'
- source: '0000:ffff::'
netmask: 'ffff:fff0::'
- source: '192.168.0.0/24'
netmask: ''
databases: 'all,replication'
- source: '192.168.1.0/24'
netmask: ''
databases: 'all'
method: reject
- source: '127.0.0.1/32'
netmask: ''
- source: '::1/128'
netmask: ''
- source: '0000:ff00::'
netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ff00'
method: scram-sha-256
- source: '172.16.0.0'
netmask: '255.255.0.0'
method: trust

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

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

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

@ -1,4 +1,3 @@
destructive
shippable/posix/group4
postgresql_publication
skip/osx

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

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

@ -0,0 +1,4 @@
---
db_name: 'ansible_db'
db_user1: 'ansible_db_user1'
db_user2: 'ansible_db_user2'

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

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

@ -1,6 +1,19 @@
---
# Setup
- name: Create test roles
postgresql_user:
name: "{{ item }}"
state: present
encrypted: yes
password: password
role_attr_flags: LOGIN
db: postgres
login_user: "{{ pg_user }}"
loop:
- "{{ db_user1 }}"
- "{{ db_user2 }}"
- name: Create DB
become_user: "{{ pg_user }}"
become: yes
@ -10,16 +23,6 @@
owner: "{{ db_user1 }}"
login_user: "{{ pg_user }}"
- name: Create a user to be owner of a schema
postgresql_user:
name: "{{ db_user2 }}"
state: present
encrypted: yes
password: password
role_attr_flags: LOGIN
db: "{{ db_name }}"
login_user: "{{ pg_user }}"
# Test: CREATE SCHEMA in checkmode
- name: Create a new schema with name "acme" in check_mode
become_user: "{{ pg_user }}"

@ -1,4 +1,3 @@
destructive
shippable/posix/group4
postgresql_sequence
skip/osx

@ -1,4 +1,3 @@
destructive
shippable/posix/group4
postgresql_set
skip/osx

@ -1,4 +1,3 @@
destructive
shippable/posix/group4
postgresql_slot
skip/osx

@ -1,4 +1,3 @@
destructive
shippable/posix/group4
postgresql_table
skip/osx

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

Loading…
Cancel
Save