postgresql: move CI test of *_publication, *_ext, *_slot to separate targets (#62646)
This commit is contained in:
parent
0c66e7ef10
commit
be9bf8cd15
15 changed files with 48 additions and 32 deletions
|
@ -1,15 +1,12 @@
|
|||
destructive
|
||||
shippable/posix/group4
|
||||
postgresql_db
|
||||
postgresql_ext
|
||||
postgresql_lang
|
||||
postgresql_pg_hba
|
||||
postgresql_privs
|
||||
postgresql_publication
|
||||
postgresql_schema
|
||||
postgresql_sequence
|
||||
postgresql_set
|
||||
postgresql_slot
|
||||
postgresql_table
|
||||
postgresql_user
|
||||
skip/osx
|
||||
|
|
|
@ -10,20 +10,7 @@
|
|||
- ansible_os_family == 'Debian'
|
||||
- postgres_version_resp.stdout is version('9.4', '>=')
|
||||
|
||||
# Test postgresql_publication
|
||||
- import_tasks: postgresql_publication.yml
|
||||
when: postgres_version_resp.stdout is version('10', '>=')
|
||||
|
||||
- include_tasks: '{{ loop_item }}'
|
||||
loop:
|
||||
# Test postgresql_set
|
||||
- postgresql_set.yml
|
||||
|
||||
# Test postgresql_slot module.
|
||||
# Physical replication slots are available from PostgreSQL 9.4
|
||||
- postgresql_slot.yml
|
||||
loop_control:
|
||||
loop_var: loop_item
|
||||
- include_tasks: postgresql_set.yml
|
||||
when: postgres_version_resp.stdout is version('9.4', '>=')
|
||||
|
||||
- include_tasks: '{{ loop_item }}'
|
||||
|
@ -59,21 +46,6 @@
|
|||
- import_tasks: postgresql_sequence.yml
|
||||
when: postgres_version_resp.stdout is version('9.0', '>=')
|
||||
|
||||
# Test postgresql_ext.
|
||||
# pg_extension system view is available from PG 9.1.
|
||||
# The tests are restricted by Fedora because there will be errors related with
|
||||
# attempts to change the environment during postgis installation or
|
||||
# missing postgis package in repositories.
|
||||
# Anyway, these tests completely depend on Postgres version,
|
||||
# not specific distributions.
|
||||
- import_tasks: postgresql_ext.yml
|
||||
when:
|
||||
- postgres_version_resp.stdout is version('9.1', '>=')
|
||||
- ansible_distribution == 'Fedora'
|
||||
|
||||
- import_tasks: postgresql_ext_version_opt.yml
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
|
||||
# Test postgresql_lang module.
|
||||
# To implement tests, it needs to install some additional packages
|
||||
# that may cause problems on different distributions,
|
||||
|
|
4
test/integration/targets/postgresql_ext/aliases
Normal file
4
test/integration/targets/postgresql_ext/aliases
Normal file
|
@ -0,0 +1,4 @@
|
|||
destructive
|
||||
shippable/posix/group4
|
||||
postgresql_ext
|
||||
skip/osx
|
3
test/integration/targets/postgresql_ext/meta/main.yml
Normal file
3
test/integration/targets/postgresql_ext/meta/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
dependencies:
|
||||
- setup_postgresql_db
|
19
test/integration/targets/postgresql_ext/tasks/main.yml
Normal file
19
test/integration/targets/postgresql_ext/tasks/main.yml
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Initial CI tests of postgresql_ext module.
|
||||
# pg_extension system view is available from PG 9.1.
|
||||
# The tests are restricted by Fedora because there will be errors related with
|
||||
# attempts to change the environment during postgis installation or
|
||||
# missing postgis package in repositories.
|
||||
# Anyway, these tests completely depend on Postgres version,
|
||||
# not specific distributions.
|
||||
- import_tasks: postgresql_ext_initial.yml
|
||||
when:
|
||||
- postgres_version_resp.stdout is version('9.1', '>=')
|
||||
- ansible_distribution == 'Fedora'
|
||||
|
||||
# CI tests of "version" option.
|
||||
# It uses a mock extension, see test/integration/targets/setup_postgresql_db/.
|
||||
# TODO: change postgresql_ext_initial.yml to use the mock extension too.
|
||||
- import_tasks: postgresql_ext_version_opt.yml
|
||||
when:
|
||||
- ansible_distribution == 'Ubuntu'
|
||||
- postgres_version_resp.stdout is version('9.1', '>=')
|
4
test/integration/targets/postgresql_publication/aliases
Normal file
4
test/integration/targets/postgresql_publication/aliases
Normal file
|
@ -0,0 +1,4 @@
|
|||
destructive
|
||||
shippable/posix/group4
|
||||
postgresql_publication
|
||||
skip/osx
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
dependencies:
|
||||
- setup_postgresql_db
|
|
@ -0,0 +1,3 @@
|
|||
# Initial CI tests of postgresql_publication module
|
||||
- import_tasks: postgresql_publication_initial.yml
|
||||
when: postgres_version_resp.stdout is version('10', '>=')
|
4
test/integration/targets/postgresql_slot/aliases
Normal file
4
test/integration/targets/postgresql_slot/aliases
Normal file
|
@ -0,0 +1,4 @@
|
|||
destructive
|
||||
shippable/posix/group4
|
||||
postgresql_slot
|
||||
skip/osx
|
3
test/integration/targets/postgresql_slot/meta/main.yml
Normal file
3
test/integration/targets/postgresql_slot/meta/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
dependencies:
|
||||
- setup_postgresql_db
|
4
test/integration/targets/postgresql_slot/tasks/main.yml
Normal file
4
test/integration/targets/postgresql_slot/tasks/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Initial CI tests of postgresql_slot module
|
||||
# Physical replication slots are available since PostgreSQL 9.4
|
||||
- import_tasks: postgresql_slot_initial.yml
|
||||
when: postgres_version_resp.stdout is version('9.4', '>=')
|
Loading…
Reference in a new issue