Skip to content

Commit

Permalink
test(inspec): enable use_upstream_repo for debian & centos-6
Browse files Browse the repository at this point in the history
* Add new `centos-6` image
* Install `9.6` from upstream repo
  • Loading branch information
myii committed May 6, 2019
1 parent 4cfde8d commit 49fdd33
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ env:
# - INSTANCE: default-opensuse-423-2018-3-py2
- INSTANCE: default-debian-8-2017-7-py2
- INSTANCE: default-ubuntu-1604-2017-7-py2
# - INSTANCE: default-centos-7-2017-7-py2
- INSTANCE: default-centos-6-2017-7-py2
- INSTANCE: default-fedora-28-2017-7-py2
- INSTANCE: default-opensuse-leap-42-2017-7-py2

Expand Down
13 changes: 1 addition & 12 deletions kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,8 @@ platforms:
provision_command:
- zypper refresh && zypper install -y net-tools
run_command: /usr/lib/systemd/systemd
# centos-6 guest fails on Debian hosts due to vsyscall issues, see
# https://hub.docker.com/_/centos, "A note about vsyscall"
# Disabled for `template-formula` because not `systemd` based
# - name: centos-6-2018-3
# driver:
# image: netmanagers/salt-2018.3-py2:centos-6
# run_command: /sbin/init

##S SALT 2017.7
## SALT 2017.7
- name: debian-8-2017-7-py2
driver:
image: netmanagers/salt-2017.7-py2:debian-8
Expand All @@ -81,10 +74,6 @@ platforms:
provision_command:
- zypper refresh && zypper install -y python-pip
run_command: /usr/lib/systemd/systemd
# - name: centos-6-2017-7
# driver:
# image: netmanagers/salt-2017.7-py2:centos-6
# run_command: /sbin/init

provisioner:
name: salt_solo
Expand Down
8 changes: 7 additions & 1 deletion test/integration/default/controls/services_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Overide by OS
service_name = 'postgresql'
if os[:name] == 'centos' and os[:release].start_with?('6')
service_name = 'postgresql-9.6'
end

control 'Postgres service' do
impact 0.5
title 'should be running and enabled'

describe service('postgresql') do
describe service(service_name) do
it { should be_enabled }
it { should be_running }
end
Expand Down
8 changes: 6 additions & 2 deletions test/salt/pillar/postgres.sls
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@ postgres.port: '5432'
postgres:
# UPSTREAM REPO
# Set True to configure upstream postgresql.org repository for YUM/APT/ZYPP
{%- if not (grains.os_family == 'Debian' or grains.osfinger == 'CentOS-6') %}
use_upstream_repo: False
# # Version to install from upstream repository (if upstream_repo: True)
# version: '10'
{%- else %}
use_upstream_repo: True
# Version to install from upstream repository (if upstream_repo: True)
version: '9.6'
# # Set True to add a file in /etc/profile.d adding the bin dir in $PATH
# # as packages from upstream put them somewhere like /usr/pgsql-10/bin
# add_profile: False
# # If automatic package installation fails, use `fromrepo` to specify the
# # upstream repo to install packages from [#133, #185] (if upstream_repo: True)
# fromrepo: 'jessie-pgdg'
{%- endif %}

# ### MACOS
# # Set to 'postgresapp' OR 'homebrew' for MacOS
Expand Down

0 comments on commit 49fdd33

Please sign in to comment.