Skip to content

Commit 49fdd33

Browse files
committed
test(inspec): enable use_upstream_repo for debian & centos-6
* Add new `centos-6` image * Install `9.6` from upstream repo
1 parent 4cfde8d commit 49fdd33

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ env:
3434
# - INSTANCE: default-opensuse-423-2018-3-py2
3535
- INSTANCE: default-debian-8-2017-7-py2
3636
- INSTANCE: default-ubuntu-1604-2017-7-py2
37-
# - INSTANCE: default-centos-7-2017-7-py2
37+
- INSTANCE: default-centos-6-2017-7-py2
3838
- INSTANCE: default-fedora-28-2017-7-py2
3939
- INSTANCE: default-opensuse-leap-42-2017-7-py2
4040

kitchen.yml

+1-12
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,8 @@ platforms:
5353
provision_command:
5454
- zypper refresh && zypper install -y net-tools
5555
run_command: /usr/lib/systemd/systemd
56-
# centos-6 guest fails on Debian hosts due to vsyscall issues, see
57-
# https://hub.docker.com/_/centos, "A note about vsyscall"
58-
# Disabled for `template-formula` because not `systemd` based
59-
# - name: centos-6-2018-3
60-
# driver:
61-
# image: netmanagers/salt-2018.3-py2:centos-6
62-
# run_command: /sbin/init
6356

64-
##S SALT 2017.7
57+
## SALT 2017.7
6558
- name: debian-8-2017-7-py2
6659
driver:
6760
image: netmanagers/salt-2017.7-py2:debian-8
@@ -81,10 +74,6 @@ platforms:
8174
provision_command:
8275
- zypper refresh && zypper install -y python-pip
8376
run_command: /usr/lib/systemd/systemd
84-
# - name: centos-6-2017-7
85-
# driver:
86-
# image: netmanagers/salt-2017.7-py2:centos-6
87-
# run_command: /sbin/init
8877

8978
provisioner:
9079
name: salt_solo

test/integration/default/controls/services_spec.rb

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1+
# Overide by OS
2+
service_name = 'postgresql'
3+
if os[:name] == 'centos' and os[:release].start_with?('6')
4+
service_name = 'postgresql-9.6'
5+
end
6+
17
control 'Postgres service' do
28
impact 0.5
39
title 'should be running and enabled'
410

5-
describe service('postgresql') do
11+
describe service(service_name) do
612
it { should be_enabled }
713
it { should be_running }
814
end

test/salt/pillar/postgres.sls

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,19 @@ postgres.port: '5432'
55
postgres:
66
# UPSTREAM REPO
77
# Set True to configure upstream postgresql.org repository for YUM/APT/ZYPP
8+
{%- if not (grains.os_family == 'Debian' or grains.osfinger == 'CentOS-6') %}
89
use_upstream_repo: False
9-
# # Version to install from upstream repository (if upstream_repo: True)
10-
# version: '10'
10+
{%- else %}
11+
use_upstream_repo: True
12+
# Version to install from upstream repository (if upstream_repo: True)
13+
version: '9.6'
1114
# # Set True to add a file in /etc/profile.d adding the bin dir in $PATH
1215
# # as packages from upstream put them somewhere like /usr/pgsql-10/bin
1316
# add_profile: False
1417
# # If automatic package installation fails, use `fromrepo` to specify the
1518
# # upstream repo to install packages from [#133, #185] (if upstream_repo: True)
1619
# fromrepo: 'jessie-pgdg'
20+
{%- endif %}
1721

1822
# ### MACOS
1923
# # Set to 'postgresapp' OR 'homebrew' for MacOS

0 commit comments

Comments
 (0)