ci(kitchen+travis): fix centos6 suite and rename to upstart

* Semi-automated using https://github.com/myii/ssf-formula/pull/247
* Problems identified while reviewing:
  - https://github.com/saltstack-formulas/template-formula/pull/203
This commit is contained in:
Imran Iqbal 2020-09-01 18:24:12 +01:00
parent 7d3d989223
commit 97309c6f4d
No known key found for this signature in database
GPG key ID: 6D8629439D2B7819
5 changed files with 31 additions and 12 deletions

View file

@ -104,8 +104,8 @@ jobs:
# - env: INSTANCE=default-fedora-31-2019-2-py3
# - env: INSTANCE=default-opensuse-leap-152-2019-2-py3
# - env: INSTANCE=default-amazonlinux-2-2019-2-py3
# - env: INSTANCE=default-centos-6-2019-2-py2
# - env: INSTANCE=default-amazonlinux-1-2019-2-py2
- env: INSTANCE=upstart-centos-6-2019-2-py2
# - env: INSTANCE=upstart-amazonlinux-1-2019-2-py2
- env: INSTANCE=default-arch-base-latest-2019-2-py2
# <REMOVEME

View file

@ -150,7 +150,8 @@ verifier:
suites:
- name: default
excludes:
- centos-6-2018-3-py2
- centos-6-2019-2-py2
- amazonlinux-1-2019-2-py2
provisioner:
state_top:
base:
@ -168,9 +169,10 @@ suites:
verifier:
inspec_tests:
- path: test/integration/default
- name: centos6
- name: upstart
includes:
- centos-6-2018-3-py2
- centos-6-2019-2-py2
- amazonlinux-1-2019-2-py2
provisioner:
state_top:
base:
@ -183,7 +185,7 @@ suites:
- TEMPLATE
- define_roles
pillars_from_files:
TEMPLATE.sls: test/salt/pillar/centos6.sls
TEMPLATE.sls: test/salt/pillar/upstart.sls
define_roles.sls: test/salt/pillar/define_roles.sls
verifier:
inspec_tests:

View file

@ -1,12 +1,20 @@
# frozen_string_literal: true
# Overide by OS
package_name = 'bash'
package_name = 'cronie' if (os[:name] == 'centos') && os[:release].start_with?('6')
# Prepare platform "finger"
platform_finger = "#{platform[:name]}-#{platform[:release].split('.')[0]}"
control 'TEMPLATE package' do
title 'should be installed'
# Overide by `platform_finger`
package_name =
case platform_finger
when 'centos-6', 'amazon-2018'
'cronie'
else
'bash'
end
describe package(package_name) do
it { should be_installed }
end

View file

@ -1,14 +1,23 @@
# frozen_string_literal: true
# Overide by OS
service_name = 'systemd-journald'
service_name = 'crond' if (os[:name] == 'centos') && os[:release].start_with?('6')
# Prepare platform "finger"
platform_finger = "#{platform[:name]}-#{platform[:release].split('.')[0]}"
control 'TEMPLATE service' do
impact 0.5
title 'should be running and enabled'
# Overide by `platform_finger`
service_name =
case platform_finger
when 'centos-6', 'amazon-2018'
'crond'
else
'systemd-journald'
end
describe service(service_name) do
it { should be_installed }
it { should be_enabled }
it { should be_running }
end