File tree 4 files changed +27
-2
lines changed
4 files changed +27
-2
lines changed Original file line number Diff line number Diff line change
1
+ # Overide by OS
2
+ pg_port = '5432'
3
+ if os [ :family ] == 'debian' or os [ :name ] == 'suse'
4
+ pg_port = '5433'
5
+ end
6
+
1
7
control 'Postgres command' do
2
8
title 'should match desired lines'
3
9
4
- describe command ( %q{su - postgres -c 'psql -qtc "\l+ db2"'} ) do
10
+ # Can't use `%Q` here due to the `\`
11
+ describe command ( %q{su - postgres -c 'psql -p} + pg_port + %q{ -qtc "\l+ db2"'} ) do
5
12
its ( :stdout ) { should match ( /.*db2.*my_space/ ) }
6
13
# its(:stdout) { should match(/db2.*remoteUser.*UTF8.*en_US\.UTF-8.*en_US\.UTF-8.*my_space/) }
7
14
end
Original file line number Diff line number Diff line change 1
1
# Overide by OS
2
2
service_name = 'postgresql'
3
+ pg_port = 5432
3
4
if os [ :name ] == 'centos' and os [ :release ] . start_with? ( '6' )
4
5
service_name = 'postgresql-9.6'
6
+ elsif os [ :family ] == 'debian' or os [ :name ] == 'suse'
7
+ pg_port = 5433
5
8
end
6
9
10
+ # Temporary `if` due to `opensuse-leap-15` bug re: `service`
11
+ if os [ :name ] == 'suse'
12
+ puts "[Skip `service`-based tests due to `opensuse-leap-15` bug]"
13
+ else
7
14
control 'Postgres service' do
8
15
impact 0.5
9
16
title 'should be running and enabled'
13
20
it { should be_running }
14
21
end
15
22
16
- describe port ( 5432 ) do
23
+ describe port ( pg_port ) do
17
24
it { should be_listening }
18
25
end
19
26
end
27
+ end
Original file line number Diff line number Diff line change @@ -9,3 +9,4 @@ supports:
9
9
- os-name : centos
10
10
- os-name : fedora
11
11
- os-name : opensuse
12
+ - os-name : suse
Original file line number Diff line number Diff line change 1
1
# Port to use for the cluster -- can be used to provide a non-standard port
2
2
# NOTE: If already set in the minion config, that value takes priority
3
+
4
+ {%- if not (grains.os_family == 'Debian' or grains.osfinger == 'Leap-15') %}
3
5
postgres.port : ' 5432'
6
+ {%- else %}
7
+ postgres.port : ' 5433'
8
+ {%- endif %}
4
9
5
10
postgres :
6
11
# UPSTREAM REPO
@@ -10,7 +15,11 @@ postgres:
10
15
{%- else %}
11
16
use_upstream_repo : True
12
17
# Version to install from upstream repository (if upstream_repo: True)
18
+ {%- if not (grains.os_family == 'Debian') %}
13
19
version : ' 9.6'
20
+ {%- else %}
21
+ version : ' 10'
22
+ {%- endif %}
14
23
# # Set True to add a file in /etc/profile.d adding the bin dir in $PATH
15
24
# # as packages from upstream put them somewhere like /usr/pgsql-10/bin
16
25
# add_profile: False
You can’t perform that action at this time.
0 commit comments