ansible/test/integration/targets/postgresql/tasks/main.yml
2019-09-23 04:28:52 -04:00

71 lines
2 KiB
YAML

# Unsorted tests that were moved from here to unsorted.yml
- import_tasks: unsorted.yml
# Test ssl.
# Restricted using Debian family because of there are errors on other distributions
# that not related with PostgreSQL or psycopg2 SSL support.
# The tests' key point is to be sure that ssl options work in general
- import_tasks: ssl.yml
when:
- ansible_os_family == 'Debian'
- postgres_version_resp.stdout is version('9.4', '>=')
- include_tasks: '{{ loop_item }}'
loop:
# Test postgresql_user module
- postgresql_user.yml
# Verify different session_role scenarios
- session_role.yml
# Test postgresql_db module, specific options
- postgresql_db.yml
# 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
# Test default_privs with target_role
- 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
vars:
test_fixture: user
file: '{{ loop_item }}'
loop:
- dbdata.sql
- dbdata.sql.gz
- dbdata.sql.bz2
- dbdata.sql.xz
- dbdata.tar
- dbdata.tar.gz
- dbdata.tar.bz2
- dbdata.tar.xz
loop_control:
loop_var: loop_item
# dump/restore tests per other logins
# ============================================================
- import_tasks: state_dump_restore.yml
vars:
file: dbdata.tar
test_fixture: admin