1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration
Josh Moore d5ae6cc585 postgres_db: add dump and restore support (#20627)
* Feature #2731: added postgres import and dump

* Feature #2731: be more permissive of arguments

```
hacking/test-module -m ./ppostgresql_db.py -a "db=example state=dump target=/tmp/out"`
```

failed previously since host, user, and port were required as keywords
in the pg_dump / pg_import methods.

* Feature #2731: fixed doc string for validate-modules

```
$ ansible-validate-modules database/postgresql/
```

now passes.

* Feature #2731: disable 'password' for dump/restore

* Feature #2731: bump added version to 2.3

* Feature #2731: replace db_import with db_restore

* Feature #2731: add missing version description

* Feature #2731: fix 'state' description

* Feature #2731: fix pep8 issues

* Feature #2731: put state documentation in a single string

* Bump added version from 2.3 to 2.4

* Fix pep8 and pylint errors

* Attempt yaml formatting of documentation string

* Add integration tests for postgres_db:dump/restore

* Update dump/restore logic to support new kw-args

Also attempt to support password; integration tests are
still failing.

* Revert to postgres user for dump/restore

Passing PGPASSWORD is not working for subprocesses. For the
moment, reverting to the strategy of failing if login_password
is set and using `postgres` for all testing of dump/restore.

* Various cleanups to have tests passing

* Working tests for {sql,tar} x {,bz2,gz,xz}

* Use pg_user to support FreeBSD

* Revert login_ prefixes and re-enable password support

All `login_` keywords are mapped to their non-prefix versions
so the previous changes were effectively using `postgres` for
all actions. With the proper keywords, PGPASSWORD-passing to
the subprocess is now working.

* Optionally add password

environ_update doesn't handle None values in the
dictionary to be added to the environment. Adding
check.

* Quick fixes

* Refactor login arguments after fixes from pchauncey

The fixes introduced by pchaunchy pointed to further issues
(like no --dbname on PG<=9.2) with the login parameters. This
refactors them and adds further tests.

Note: this will still not pass integration tests due to a further
      issue with pg_dump as a non-admin user:

      pg_restore: [archiver (db)] Error while PROCESSING TOC:
      pg_restore: [archiver (db)] Error from TOC entry 1925; 0 0 COMMENT EXTENSION plpgsql
      pg_restore: [archiver (db)] could not execute query: ERROR:  must be owner of extension plpgsql

* Introduce target_opts for passing limiting dumped/restored schemas

The current integration tests (PG version and template DBs) don't
permit a regular user (`{{ db_user1 }}`) access to plpgsql causing
restores to fail. By adding an option for passing arbitrary args to
pg_dump and pg_restore, testing is made easier. This also paves the
way for `-j` usage, once the PG version is bumped.
2017-07-10 08:05:42 +01:00
..
group_vars Run vyos_command Network tests in Shippable (#24514) 2017-05-12 12:49:12 +01:00
host_vars breaks testing in non virtual envs, since env var can be used in those 2015-11-12 09:40:43 -08:00
roles Add module netscaler_cs_action (#26147) 2017-06-28 19:16:46 +05:30
targets postgres_db: add dump and restore support (#20627) 2017-07-10 08:05:42 +01:00
vars Split integration tests out from Makefile. (#17976) 2016-10-12 14:57:53 -07:00
amazon.yml Adding support for Amazon ECR (#19306) 2017-01-17 14:45:43 -05:00
asa.yaml Continue running network tests after failure (#26407) 2017-07-04 18:18:02 +01:00
azure.yml add azure integration tests 2015-05-04 23:45:03 -04:00
cleanup_azure.py test/: PEP8 compliancy (#24803) 2017-05-30 18:05:19 +01:00
cleanup_ec2.py test/: PEP8 compliancy (#24803) 2017-05-30 18:05:19 +01:00
cleanup_gce.py test/: PEP8 compliancy (#24803) 2017-05-30 18:05:19 +01:00
cleanup_rax.py test/: PEP8 compliancy (#24803) 2017-05-30 18:05:19 +01:00
cloud-config-aws.yml.template Add support for cloud tests to ansible-test. (#24315) 2017-05-05 16:23:00 +08:00
cloud-config-cs.ini.template Add support for cloud tests to ansible-test. (#24315) 2017-05-05 16:23:00 +08:00
cloudflare.yml Fix cosmetic problems in YAML source 2016-11-11 14:50:57 -08:00
cloudscale.yml new module cloudscale_server (#20175) 2017-01-17 23:15:20 +01:00
cnos.yaml New module: cnos_vlan and various utility files (#21107) 2017-02-16 08:11:39 +00:00
consul.yml Initial commit of Ansible support for the Consul clustering framework (http://consul.io). 2015-01-24 01:09:03 +00:00
consul_inventory.yml Initial commit of Ansible support for the Consul clustering framework (http://consul.io). 2015-01-24 01:09:03 +00:00
consul_running.py Support print() function in test/ 2015-08-27 22:15:57 +03:00
credentials.template Update git test to not rm ~/.ssh/known_hosts. 2017-07-05 16:05:28 -07:00
dellos6.yaml Migrate Network Tests into ansible/ansible (#18233) 2016-10-28 19:50:29 +01:00
dellos9.yaml Migrate Network Tests into ansible/ansible (#18233) 2016-10-28 19:50:29 +01:00
dellos10.yaml Migrate Network Tests into ansible/ansible (#18233) 2016-10-28 19:50:29 +01:00
eos.yaml Continue running network tests after failure (#26407) 2017-07-04 18:18:02 +01:00
exoscale.yml exo_dns: new module utils and integration tests for exoscale DNS (#17230) 2016-08-30 21:48:28 +02:00
galaxy_playbook.yml Allow installation of roles from yaml roles file 2014-08-21 17:15:23 -04:00
galaxy_playbook_git.yml [hotfix] add missed playbook file 2016-01-21 14:08:26 +02:00
galaxy_roles.yml Fix cosmetic problems in YAML source 2016-11-11 14:50:57 -08:00
galaxy_rolesfile Add tests for #10620 2015-11-18 20:47:54 +10:00
gce.yml [GCP] Global Load Balancer Integration Test (#24704) 2017-05-18 14:00:51 -04:00
gce_credentials.py test/: PEP8 compliancy (#24803) 2017-05-30 18:05:19 +01:00
integration_config.yml Fix cosmetic problems in YAML source 2016-11-11 14:50:57 -08:00
inventory Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
inventory.network Add VyOS integration tests for net_linkagg (#26478) 2017-07-06 11:25:15 +02:00
inventory.networking.template Increase python version coverage for tests. (#24762) 2017-05-19 01:37:53 +08:00
inventory.remote.template Add support for OS X CI on Shippable. (#17160) 2016-08-23 10:49:46 -07:00
inventory.winrm.template Increase python version coverage for tests. (#24762) 2017-05-19 01:37:53 +08:00
ios.yaml Continue running network tests after failure (#26407) 2017-07-04 18:18:02 +01:00
iosxr.yaml Continue running network tests after failure (#26407) 2017-07-04 18:18:02 +01:00
jenkins.yml jenkins_job: add integration tests (#17499) 2016-09-13 16:03:58 +02:00
junos.yaml Implementation of junos_static_route module (#26501) 2017-07-07 13:25:14 +05:30
Makefile Remove legacy integration test make targets. (#26255) 2017-06-29 12:34:54 -07:00
netscaler.yaml Add netscaler_server module (#25537) 2017-06-27 23:08:00 +05:30
network-all.yaml add vyos, openvswitch to network-all playbook (#26167) 2017-06-28 13:27:55 +05:30
nxos.yaml Continue running network tests after failure (#26407) 2017-07-04 18:18:02 +01:00
ops.yaml Continue running network tests after failure (#26407) 2017-07-04 18:18:02 +01:00
ovs.yaml Enforce the _raw_params variable with include_role (#26430) 2017-07-05 15:53:10 +01:00
platform_agnostic.yaml Add VyOS integration tests for net_linkagg (#26478) 2017-07-06 11:25:15 +02:00
rackspace.yml Add tests for rax_scaling_group 2015-06-18 13:08:35 -05:00
setup_gce.py test/: PEP8 compliancy (#24803) 2017-05-30 18:05:19 +01:00
target-prefixes.network Fix network integration test config. (#26057) 2017-06-23 17:02:59 -07:00
vyos.yaml Enable vyos_linkagg integration tests and test with 3 NICs (#26519) 2017-07-07 10:40:18 +02:00