diff options
author | Paul B <paul@bonaud.fr> | 2019-01-25 13:38:57 +0100 |
---|---|---|
committer | Paul B <paul@bonaud.fr> | 2019-01-29 11:42:40 +0100 |
commit | dd54b74860fd9db85807619109b000b16b9bf52e (patch) | |
tree | 76d260e8794efa0d4bc68fdae79303414dd7a5c8 | |
parent | 4d626d5a5c05f4676c0a403929de775404f9e63c (diff) | |
download | ansible-postgresql-role-dd54b74860fd9db85807619109b000b16b9bf52e.tar.gz ansible-postgresql-role-dd54b74860fd9db85807619109b000b16b9bf52e.tar.zst ansible-postgresql-role-dd54b74860fd9db85807619109b000b16b9bf52e.zip |
tests: adding a database creation with extensions
-rw-r--r-- | .travis.yml | 4 | ||||
-rw-r--r-- | test/main.yml | 13 |
2 files changed, 16 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml index 7a72289..c424411 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -13,7 +13,7 @@ addons: | |||
13 | 13 | ||
14 | install: | 14 | install: |
15 | # Install ansible | 15 | # Install ansible |
16 | - pip install ansible | 16 | - pip install ansible docker-py docker |
17 | # Check ansible version | 17 | # Check ansible version |
18 | - ansible --version | 18 | - ansible --version |
19 | - ansible-galaxy install -r test/requirements.yml -p test/roles/ | 19 | - ansible-galaxy install -r test/requirements.yml -p test/roles/ |
@@ -21,6 +21,8 @@ install: | |||
21 | script: | 21 | script: |
22 | # Basic role syntax check | 22 | # Basic role syntax check |
23 | - ansible-playbook test/main.yml -i test/hosts --syntax-check | 23 | - ansible-playbook test/main.yml -i test/hosts --syntax-check |
24 | # Run the tests | ||
25 | - ansible-playbook test/main.yml -i test/hosts | ||
24 | 26 | ||
25 | notifications: | 27 | notifications: |
26 | webhooks: https://galaxy.ansible.com/api/v1/notifications/ | 28 | webhooks: https://galaxy.ansible.com/api/v1/notifications/ |
diff --git a/test/main.yml b/test/main.yml index 6258199..bc9d27c 100644 --- a/test/main.yml +++ b/test/main.yml | |||
@@ -49,12 +49,25 @@ | |||
49 | archive_enabled: True | 49 | archive_enabled: True |
50 | barman_directory: "{{ postgres_barman_directory }}" | 50 | barman_directory: "{{ postgres_barman_directory }}" |
51 | users: | 51 | users: |
52 | - username: tester | ||
53 | password: tester | ||
52 | - username: barman | 54 | - username: barman |
53 | password: "secret_cocktail" | 55 | password: "secret_cocktail" |
54 | permissions: 'SUPERUSER' | 56 | permissions: 'SUPERUSER' |
55 | - username: replicator | 57 | - username: replicator |
56 | password: "secret_repli" | 58 | password: "secret_repli" |
57 | permissions: 'REPLICATION' | 59 | permissions: 'REPLICATION' |
60 | databases: | ||
61 | - dbname: test_database | ||
62 | owner: tester | ||
63 | extensions: | ||
64 | - description: PostGis | ||
65 | apt_deps: | ||
66 | - "postgresql-{{ postgres_version }}-postgis" | ||
67 | names: | ||
68 | - postgis | ||
69 | - postgis_topology | ||
70 | - btree_gist | ||
58 | 71 | ||
59 | with_items: | 72 | with_items: |
60 | - postgres_one | 73 | - postgres_one |