diff --git a/.travis.yml b/.travis.yml index b470e28..b1e9b45 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/kitchen.yml b/kitchen.yml index 354b384..4e9542e 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -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 @@ -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 diff --git a/test/integration/default/controls/services_spec.rb b/test/integration/default/controls/services_spec.rb index f0e9dd5..3d9f0ae 100644 --- a/test/integration/default/controls/services_spec.rb +++ b/test/integration/default/controls/services_spec.rb @@ -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 diff --git a/test/salt/pillar/postgres.sls b/test/salt/pillar/postgres.sls index 3883775..e803bf3 100644 --- a/test/salt/pillar/postgres.sls +++ b/test/salt/pillar/postgres.sls @@ -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