Skip to content

Commit 27473b9

Browse files
committed
test(pillar): use separate pillars to test default & repo suites
1 parent a6c8197 commit 27473b9

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

test/salt/pillar/postgres.sls

+5-17
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,7 @@ postgres.port: '5433'
88
{%- endif %}
99

1010
postgres:
11-
# UPSTREAM REPO
12-
# Set True to configure upstream postgresql.org repository for YUM/APT/ZYPP
13-
{%- if grains.os_family != 'Debian' and salt['grains.get']('osfinger') != 'CentOS-6' %}
14-
use_upstream_repo: False
15-
{%- else %}
16-
use_upstream_repo: True
17-
# Version to install from upstream repository (if upstream_repo: True)
18-
version: '13'
19-
# # Set True to add a file in /etc/profile.d adding the bin dir in $PATH
20-
# # as packages from upstream put them somewhere like /usr/pgsql-10/bin
21-
# add_profile: False
22-
# # If automatic package installation fails, use `fromrepo` to specify the
23-
# # upstream repo to install packages from [#133, #185] (if upstream_repo: True)
24-
# fromrepo: 'jessie-pgdg'
25-
{%- endif %}
11+
use_upstream_repo: false
2612

2713
# ### MACOS
2814
# # Set to 'postgresapp' OR 'homebrew' for MacOS
@@ -177,7 +163,8 @@ postgres:
177163
public:
178164
owner: localUser
179165
# enable per-db extension
180-
{%- if grains.os_family == 'Debian' and salt['grains.get']('osfinger') != 'Debian-8' %}
166+
{#- TODO: Find a way to only disable this for the `default` suite, since it works with the `repo` suite #}
167+
{%- if grains.os_family == 'Debian' and salt['grains.get']('osfinger') != 'Debian-9' %}
181168
extensions:
182169
uuid-ossp:
183170
schema: 'public'
@@ -190,7 +177,8 @@ postgres:
190177
owner: localUser
191178

192179
# optional extensions to install in schema
193-
{%- if grains.os_family == 'Debian' and salt['grains.get']('osfinger') != 'Debian-8' %}
180+
{#- TODO: Find a way to only disable this for the `default` suite, since it works with the `repo` suite #}
181+
{%- if grains.os_family == 'Debian' and salt['grains.get']('osfinger') != 'Debian-9' %}
194182
extensions:
195183
uuid-ossp:
196184
schema: uuid-ossp

test/salt/pillar/repo.sls

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
postgres:
3+
use_upstream_repo: true
4+
version: '13'

0 commit comments

Comments
 (0)