Skip to content

Commit 1719179

Browse files
myiinoelmcloughlin
authored andcommittedJan 23, 2020
refactor(kitchen+travis+inspec): use pre-salted images
* Semi-automated using myii/ssf-formula#36 * Restructure all tests according to updated test suites * Improve tests where necessary (code style, new platforms and package versions)
1 parent 2fb9166 commit 1719179

25 files changed

+472
-212
lines changed
 

‎.travis.yml

+18-25
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,24 @@ env:
2424
# slow down the entire run at the end (i.e. `centos-6` and `opensuse`)
2525
# However, the groupings needed to be maintained in some semblance of order
2626
# so this is a best-effort matrix, in the circumstances
27-
28-
# develop-py3
29-
- INSTANCE: develop-py3-debian-9
30-
- INSTANCE: develop-py3-opensuse-150
31-
# - INSTANCE: develop-py3-ubuntu-1804
32-
33-
# 2017.7-py2
34-
- INSTANCE: v2017-7-py2-bootstrap-centos-6
35-
# - INSTANCE: v2017-7-py2-debian-8
36-
- INSTANCE: v2017-7-py2-ubuntu-1604
37-
38-
# 2018.3-py2
39-
# - INSTANCE: v2018-3-py2-centos-7
40-
- INSTANCE: v2018-3-py2-debian-8
41-
- INSTANCE: v2018-3-py2-forced-version-fedora-29
42-
# - INSTANCE: v2018-3-py2-ubuntu-1604
43-
44-
# 2019.2-py2
45-
- INSTANCE: v2019-2-py2-centos-7
46-
- INSTANCE: v2019-2-py2-fedora-30
47-
48-
# 2019.2-py3
49-
# - INSTANCE: v2019-2-py3-debian-9
50-
- INSTANCE: v2019-2-py3-opensuse-150
51-
- INSTANCE: v2019-2-py3-ubuntu-1804
27+
# - INSTANCE: v201707-py2-debian-8-2017-7-py2
28+
- INSTANCE: v201707-py2-ubuntu-1604-2017-7-py2
29+
- INSTANCE: v201707-py2-centos-6-2017-7-py2
30+
# - INSTANCE: v201707-py2-amazonlinux-2-2017-7-py2
31+
# - INSTANCE: v201803-py2-debian-9-2018-3-py2
32+
# - INSTANCE: v201803-py2-ubuntu-1604-2018-3-py2
33+
- INSTANCE: v201803-py2-centos-7-2018-3-py2
34+
- INSTANCE: v201803-py2-amazonlinux-2-2018-3-py2
35+
- INSTANCE: v201902-py2-debian-9-2019-2-py2
36+
- INSTANCE: v201902-py2-ubuntu-1804-2019-2-py2
37+
# - INSTANCE: v201902-py2-centos-7-2019-2-py2
38+
# - INSTANCE: v201902-py2-opensuse-leap-15-2019-2-py2
39+
# - INSTANCE: v201902-py2-amazonlinux-2-2019-2-py2
40+
# - INSTANCE: v201902-py3-debian-9-2019-2-py3
41+
# - INSTANCE: v201902-py3-ubuntu-1804-2019-2-py3
42+
# - INSTANCE: v201902-py3-centos-7-2019-2-py3
43+
- INSTANCE: v201902-py3-fedora-30-2019-2-py3
44+
- INSTANCE: v201902-py3-opensuse-leap-15-2019-2-py3
5245

5346
script:
5447
- bin/kitchen verify ${INSTANCE}

‎kitchen.yml

+126-138
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,96 @@
11
# -*- coding: utf-8 -*-
22
# vim: ft=yaml
33
---
4+
# For help on this file's format, see https://kitchen.ci/
45
driver:
56
name: docker
67
use_sudo: false
78
privileged: true
8-
provision_command: mkdir -p /run/sshd
99
run_command: /lib/systemd/systemd
1010

11+
# Make sure the platforms listed below match up with
12+
# the `env.matrix` instances defined in `.travis.yml`
1113
platforms:
12-
# Latest distros
13-
- name: debian-9
14-
- name: ubuntu-18.04
15-
- name: centos-7
16-
- name: fedora-30
17-
- name: opensuse-15.0
18-
driver:
19-
image: opensuse/leap:15.0
14+
## SALT `2017.7`
15+
- name: debian-8-2017-7-py2
16+
driver:
17+
image: netmanagers/salt-2017.7-py2:debian-8
18+
- name: ubuntu-1604-2017-7-py2
19+
driver:
20+
image: netmanagers/salt-2017.7-py2:ubuntu-16.04
21+
- name: centos-6-2017-7-py2
22+
driver:
23+
image: netmanagers/salt-2017.7-py2:centos-6
24+
run_command: /sbin/init
25+
- name: amazonlinux-2-2017-7-py2
26+
driver:
27+
image: netmanagers/salt-2017.7-py2:amazonlinux-2
28+
29+
## SALT `2018.3`
30+
- name: debian-9-2018-3-py2
31+
driver:
32+
image: netmanagers/salt-2018.3-py2:debian-9
33+
- name: ubuntu-1604-2018-3-py2
34+
driver:
35+
image: netmanagers/salt-2018.3-py2:ubuntu-16.04
36+
- name: centos-7-2018-3-py2
37+
driver:
38+
image: netmanagers/salt-2018.3-py2:centos-7
39+
- name: amazonlinux-2-2018-3-py2
40+
driver:
41+
image: netmanagers/salt-2018.3-py2:amazonlinux-2
42+
43+
## SALT `2019.2`
44+
- name: debian-9-2019-2-py2
45+
driver:
46+
image: netmanagers/salt-2019.2-py2:debian-9
47+
- name: ubuntu-1804-2019-2-py2
48+
driver:
49+
image: netmanagers/salt-2019.2-py2:ubuntu-18.04
50+
- name: centos-7-2019-2-py2
51+
driver:
52+
image: netmanagers/salt-2019.2-py2:centos-7
53+
- name: opensuse-leap-15-2019-2-py2
54+
driver:
55+
image: netmanagers/salt-2019.2-py2:opensuse-leap-15
2056
run_command: /usr/lib/systemd/systemd
21-
provision_command:
22-
- systemctl enable sshd.service
2357
# Workaround to avoid intermittent failures on `opensuse-leap-15`:
2458
# => SCP did not finish successfully (255): (Net::SCP::Error)
2559
transport:
2660
max_ssh_sessions: 1
27-
28-
# Previous distros
29-
- name: debian-8
30-
- name: ubuntu-16.04
31-
- name: fedora-29
32-
# centos-6 guest fails on Debian hosts due to vsyscall issues, see
33-
# https://hub.docker.com/_/centos, "A note about vsyscall"
34-
- name: centos-6
61+
- name: amazonlinux-2-2019-2-py2
3562
driver:
36-
run_command: /sbin/init
63+
image: netmanagers/salt-2019.2-py2:amazonlinux-2
64+
- name: debian-9-2019-2-py3
65+
driver:
66+
image: netmanagers/salt-2019.2-py3:debian-9
67+
- name: ubuntu-1804-2019-2-py3
68+
driver:
69+
image: netmanagers/salt-2019.2-py3:ubuntu-18.04
70+
- name: centos-7-2019-2-py3
71+
driver:
72+
image: netmanagers/salt-2019.2-py3:centos-7
73+
- name: fedora-30-2019-2-py3
74+
driver:
75+
image: netmanagers/salt-2019.2-py3:fedora-30
76+
- name: opensuse-leap-15-2019-2-py3
77+
driver:
78+
image: netmanagers/salt-2019.2-py3:opensuse-leap-15
79+
run_command: /usr/lib/systemd/systemd
80+
# Workaround to avoid intermittent failures on `opensuse-leap-15`:
81+
# => SCP did not finish successfully (255): (Net::SCP::Error)
82+
transport:
83+
max_ssh_sessions: 1
3784

3885
provisioner:
3986
name: salt_solo
40-
salt_bootstrap_options: -X -d git %s
4187
log_level: info
88+
salt_install: none
4289
require_chef: false
4390
formula: salt
4491
salt_copy_filter:
4592
- .kitchen
4693
- .git
47-
state_top:
48-
base:
49-
'*':
50-
- salt.pkgrepo
51-
- salt.master
52-
- salt.minion
5394

5495
verifier:
5596
# https://www.inspec.io/
@@ -60,158 +101,105 @@ verifier:
60101
- cli
61102

62103
suites:
63-
# Latest distros, salt develop, python3
64-
# These distros have py3 packages available in salt's repo
65-
- name: develop-py3
66-
includes:
67-
- debian-9
68-
- ubuntu-18.04
69-
- opensuse-15.0
70-
provisioner:
71-
salt_bootstrap_options: -X -x python3 -d git %s
72-
salt_version: 'develop'
73-
pillars:
74-
top.sls:
75-
base:
76-
'*':
77-
- salt
78-
- develop-py3
79-
pillars_from_files:
80-
salt.sls: test/salt/pillar/salt.sls
81-
develop-py3.sls: test/salt/pillar/develop-py3.sls
82-
verifier:
83-
inspec_tests:
84-
- path: test/integration/develop
85-
86-
# Latest distros, latest salt, python3
87-
# These distros have py3 packages available in salt's repo
88-
- name: v2019-2-py3
104+
- name: v201902-py3
89105
includes:
90-
- debian-9
91-
- ubuntu-18.04
92-
- opensuse-15.0
106+
- debian-9-2019-2-py3
107+
- ubuntu-1804-2019-2-py3
108+
- centos-7-2019-2-py3
109+
- fedora-30-2019-2-py3
110+
- opensuse-leap-15-2019-2-py3
93111
provisioner:
94-
salt_bootstrap_options: -X -x python3 -d git %s
95-
salt_version: '2019.2'
112+
state_top:
113+
base:
114+
'*':
115+
- salt.pkgrepo
116+
- salt.master
117+
- salt.minion
96118
pillars:
97119
top.sls:
98120
base:
99121
'*':
100122
- salt
101-
- v2019-2-py3
123+
- v201902-py3
102124
pillars_from_files:
103125
salt.sls: test/salt/pillar/salt.sls
104-
v2019-2-py3.sls: test/salt/pillar/v2019-2-py3.sls
126+
v201902-py3.sls: test/salt/pillar/v201902-py3.sls
105127
verifier:
106128
inspec_tests:
107-
- path: test/integration/2019-2
108-
109-
# Latest distros, latest salt, python2
110-
# Fedora ships updated py2 versions in their own repos
111-
- name: v2019-2-py2
129+
- path: test/integration/v201902-py3
130+
- name: v201902-py2
112131
includes:
113-
- centos-7
114-
- fedora-30
132+
- debian-9-2019-2-py2
133+
- ubuntu-1804-2019-2-py2
134+
- centos-7-2019-2-py2
135+
- opensuse-leap-15-2019-2-py2
136+
- amazonlinux-2-2019-2-py2
115137
provisioner:
116-
salt_version: '2019.2'
138+
state_top:
139+
base:
140+
'*':
141+
- salt.pkgrepo
142+
- salt.master
143+
- salt.minion
117144
pillars:
118145
top.sls:
119146
base:
120147
'*':
121148
- salt
122-
- v2019-2-py2
149+
- v201902-py2
123150
pillars_from_files:
124151
salt.sls: test/salt/pillar/salt.sls
125-
v2019-2-py2.sls: test/salt/pillar/v2019-2-py2.sls
152+
v201902-py2.sls: test/salt/pillar/v201902-py2.sls
126153
verifier:
127154
inspec_tests:
128-
- path: test/integration/2019-2
129-
130-
# Previous distros, previous salt, python2
131-
- name: v2018-3-py2
155+
- path: test/integration/v201902-py2
156+
- name: v201803-py2
132157
includes:
133-
- debian-8
134-
- ubuntu-16.04
135-
- centos-7
158+
- debian-9-2018-3-py2
159+
- ubuntu-1604-2018-3-py2
160+
- centos-7-2018-3-py2
161+
- amazonlinux-2-2018-3-py2
136162
provisioner:
137-
# We require an old version of salt in the provisioner or,
138-
# the salt formula fails to downgrade to the desired version to test
139-
salt_version: '2018.3'
163+
state_top:
164+
base:
165+
'*':
166+
- salt.pkgrepo
167+
- salt.master
168+
- salt.minion
140169
pillars:
141170
top.sls:
142171
base:
143172
'*':
144173
- salt
145-
- v2018-3-py2
174+
- v201803-py2
146175
pillars_from_files:
147176
salt.sls: test/salt/pillar/salt.sls
148-
v2018-3-py2.sls: test/salt/pillar/v2018-3-py2.sls
177+
v201803-py2.sls: test/salt/pillar/v201803-py2.sls
149178
verifier:
150179
inspec_tests:
151-
- path: test/integration/2018-3
152-
153-
# To test fedora 29 & salt v2018.3, we need to force the package version
154-
# otherwise the image, which includes the 'updates' repo, will install 2019.2
155-
- name: v2018-3-py2-forced-version
156-
includes:
157-
- fedora-29
158-
provisioner:
159-
# We require an old version of salt in the provisioner or,
160-
# the salt formula fails to downgrade to the desired version to test
161-
salt_version: '2018.3'
162-
pillars:
163-
top.sls:
164-
base:
165-
'*':
166-
- salt
167-
- v2018-3-py2-forced-version
168-
pillars_from_files:
169-
salt.sls: test/salt/pillar/salt.sls
170-
v2018-3-py2-forced-version.sls: test/salt/pillar/v2018-3-py2-forced-version.sls
171-
verifier:
172-
inspec_tests:
173-
- path: test/integration/2018-3
174-
175-
# Previous distros, oldest salt, python2
176-
- name: v2017-7-py2
177-
includes:
178-
- debian-8
179-
- ubuntu-16.04
180-
provisioner:
181-
# We require an old version of salt in the provisioner or,
182-
# the salt formula fails to downgrade to the desired version to test
183-
salt_version: '2017.7'
184-
pillars:
185-
top.sls:
186-
base:
187-
'*':
188-
- salt
189-
- v2017-7-py2
190-
pillars_from_files:
191-
salt.sls: test/salt/pillar/salt.sls
192-
v2017-7-py2.sls: test/salt/pillar/v2017-7-py2.sls
193-
verifier:
194-
inspec_tests:
195-
- path: test/integration/2017-7
196-
197-
# centos-6 ships with python2.6, so it requires extra bootstrapping parameters
198-
# to install python2.7
199-
- name: v2017-7-py2-bootstrap
180+
- path: test/integration/v201803-py2
181+
- name: v201707-py2
200182
includes:
201-
- centos-6
183+
- debian-8-2017-7-py2
184+
- ubuntu-1604-2017-7-py2
185+
- centos-6-2017-7-py2
186+
- amazonlinux-2-2017-7-py2
202187
provisioner:
203-
# As centos-6 ships with python2.6, we use the bootstrapper to install python2.7
204-
salt_bootstrap_options: -X -d stable %s
205-
salt_version: '2017.7'
188+
state_top:
189+
base:
190+
'*':
191+
- salt.pkgrepo
192+
- salt.master
193+
- salt.minion
206194
pillars:
207195
top.sls:
208196
base:
209197
'*':
210198
- salt
211-
- v2017-7-py2
199+
- v201707-py2
212200
pillars_from_files:
213201
salt.sls: test/salt/pillar/salt.sls
214-
v2017-7-py2.sls: test/salt/pillar/v2017-7-py2.sls
202+
v201707-py2.sls: test/salt/pillar/v201707-py2.sls
215203
verifier:
216204
inspec_tests:
217-
- path: test/integration/2017-7
205+
- path: test/integration/v201707-py2

0 commit comments

Comments
 (0)