diff --git a/test/integration/targets/postgresql/aliases b/test/integration/targets/postgresql/aliases index 1f3b595e63f..f0ed8d31840 100644 --- a/test/integration/targets/postgresql/aliases +++ b/test/integration/targets/postgresql/aliases @@ -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 diff --git a/test/integration/targets/postgresql/tasks/main.yml b/test/integration/targets/postgresql/tasks/main.yml index f8559f20c28..d4312b0b730 100644 --- a/test/integration/targets/postgresql/tasks/main.yml +++ b/test/integration/targets/postgresql/tasks/main.yml @@ -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', '>=') diff --git a/test/integration/targets/postgresql_copy/meta/main.yml b/test/integration/targets/postgresql_copy/meta/main.yml index 85b1dc7e4cf..f3345cb6151 100644 --- a/test/integration/targets/postgresql_copy/meta/main.yml +++ b/test/integration/targets/postgresql_copy/meta/main.yml @@ -1,3 +1,3 @@ --- dependencies: - - setup_postgresql_db +- setup_postgresql_db diff --git a/test/integration/targets/postgresql_copy/tasks/main.yml b/test/integration/targets/postgresql_copy/tasks/main.yml index 91e692530e2..c32a3dfaf60 100644 --- a/test/integration/targets/postgresql_copy/tasks/main.yml +++ b/test/integration/targets/postgresql_copy/tasks/main.yml @@ -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', '>=') diff --git a/test/integration/targets/postgresql_info/aliases b/test/integration/targets/postgresql_info/aliases new file mode 100644 index 00000000000..31da9b670aa --- /dev/null +++ b/test/integration/targets/postgresql_info/aliases @@ -0,0 +1,4 @@ +destructive +shippable/posix/group4 +postgresql_info +skip/osx diff --git a/test/integration/targets/postgresql_info/defaults/main.yml b/test/integration/targets/postgresql_info/defaults/main.yml new file mode 100644 index 00000000000..73eb55ae255 --- /dev/null +++ b/test/integration/targets/postgresql_info/defaults/main.yml @@ -0,0 +1,2 @@ +--- +db_default: postgres diff --git a/test/integration/targets/postgresql_info/meta/main.yml b/test/integration/targets/postgresql_info/meta/main.yml new file mode 100644 index 00000000000..f3345cb6151 --- /dev/null +++ b/test/integration/targets/postgresql_info/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: +- setup_postgresql_db diff --git a/test/integration/targets/postgresql_info/tasks/main.yml b/test/integration/targets/postgresql_info/tasks/main.yml new file mode 100644 index 00000000000..43d2c9ba21d --- /dev/null +++ b/test/integration/targets/postgresql_info/tasks/main.yml @@ -0,0 +1,2 @@ +# Initial CI tests of postgresql_info module +- import_tasks: postgresql_info_initial.yml diff --git a/test/integration/targets/postgresql/tasks/postgresql_info.yml b/test/integration/targets/postgresql_info/tasks/postgresql_info_initial.yml similarity index 100% rename from test/integration/targets/postgresql/tasks/postgresql_info.yml rename to test/integration/targets/postgresql_info/tasks/postgresql_info_initial.yml diff --git a/test/integration/targets/postgresql_owner/aliases b/test/integration/targets/postgresql_owner/aliases new file mode 100644 index 00000000000..dd925a61405 --- /dev/null +++ b/test/integration/targets/postgresql_owner/aliases @@ -0,0 +1,4 @@ +destructive +shippable/posix/group4 +postgresql_owner +skip/osx diff --git a/test/integration/targets/postgresql_owner/defaults/main.yml b/test/integration/targets/postgresql_owner/defaults/main.yml new file mode 100644 index 00000000000..1a5d6f307f8 --- /dev/null +++ b/test/integration/targets/postgresql_owner/defaults/main.yml @@ -0,0 +1 @@ +test_tablespace_path: "/ssd" diff --git a/test/integration/targets/postgresql_owner/meta/main.yml b/test/integration/targets/postgresql_owner/meta/main.yml new file mode 100644 index 00000000000..f3345cb6151 --- /dev/null +++ b/test/integration/targets/postgresql_owner/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: +- setup_postgresql_db diff --git a/test/integration/targets/postgresql_owner/tasks/main.yml b/test/integration/targets/postgresql_owner/tasks/main.yml new file mode 100644 index 00000000000..78076349d2b --- /dev/null +++ b/test/integration/targets/postgresql_owner/tasks/main.yml @@ -0,0 +1,2 @@ +# Initial CI tests of postgresql_owner module +- import_tasks: postgresql_owner_initial.yml diff --git a/test/integration/targets/postgresql/tasks/postgresql_owner.yml b/test/integration/targets/postgresql_owner/tasks/postgresql_owner_initial.yml similarity index 97% rename from test/integration/targets/postgresql/tasks/postgresql_owner.yml rename to test/integration/targets/postgresql_owner/tasks/postgresql_owner_initial.yml index b8d749835aa..3728c7fb8bb 100644 --- a/test/integration/targets/postgresql/tasks/postgresql_owner.yml +++ b/test/integration/targets/postgresql_owner/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: diff --git a/test/integration/targets/postgresql_ping/aliases b/test/integration/targets/postgresql_ping/aliases new file mode 100644 index 00000000000..ca9d9606331 --- /dev/null +++ b/test/integration/targets/postgresql_ping/aliases @@ -0,0 +1,4 @@ +destructive +shippable/posix/group4 +postgresql_ping +skip/osx diff --git a/test/integration/targets/postgresql_ping/defaults/main.yml b/test/integration/targets/postgresql_ping/defaults/main.yml new file mode 100644 index 00000000000..73eb55ae255 --- /dev/null +++ b/test/integration/targets/postgresql_ping/defaults/main.yml @@ -0,0 +1,2 @@ +--- +db_default: postgres diff --git a/test/integration/targets/postgresql_ping/meta/main.yml b/test/integration/targets/postgresql_ping/meta/main.yml new file mode 100644 index 00000000000..f3345cb6151 --- /dev/null +++ b/test/integration/targets/postgresql_ping/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: +- setup_postgresql_db diff --git a/test/integration/targets/postgresql_ping/tasks/main.yml b/test/integration/targets/postgresql_ping/tasks/main.yml new file mode 100644 index 00000000000..d44fef2164b --- /dev/null +++ b/test/integration/targets/postgresql_ping/tasks/main.yml @@ -0,0 +1,4 @@ +# Initial CI tests of postgresql_ping module +- import_tasks: postgresql_ping_initial.yml + vars: + db_name_nonexist: fake_db diff --git a/test/integration/targets/postgresql/tasks/postgresql_ping.yml b/test/integration/targets/postgresql_ping/tasks/postgresql_ping_initial.yml similarity index 100% rename from test/integration/targets/postgresql/tasks/postgresql_ping.yml rename to test/integration/targets/postgresql_ping/tasks/postgresql_ping_initial.yml diff --git a/test/integration/targets/postgresql_query/aliases b/test/integration/targets/postgresql_query/aliases new file mode 100644 index 00000000000..9a87d62ddcd --- /dev/null +++ b/test/integration/targets/postgresql_query/aliases @@ -0,0 +1,4 @@ +destructive +shippable/posix/group4 +postgresql_query +skip/osx diff --git a/test/integration/targets/postgresql_query/meta/main.yml b/test/integration/targets/postgresql_query/meta/main.yml new file mode 100644 index 00000000000..f3345cb6151 --- /dev/null +++ b/test/integration/targets/postgresql_query/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: +- setup_postgresql_db diff --git a/test/integration/targets/postgresql_query/tasks/main.yml b/test/integration/targets/postgresql_query/tasks/main.yml new file mode 100644 index 00000000000..76a54058b1a --- /dev/null +++ b/test/integration/targets/postgresql_query/tasks/main.yml @@ -0,0 +1,2 @@ +# Initial CI tests of postgresql_query module +- import_tasks: postgresql_query_initial.yml diff --git a/test/integration/targets/postgresql/tasks/postgresql_query.yml b/test/integration/targets/postgresql_query/tasks/postgresql_query_initial.yml similarity index 100% rename from test/integration/targets/postgresql/tasks/postgresql_query.yml rename to test/integration/targets/postgresql_query/tasks/postgresql_query_initial.yml