Merge pull request #45226 from gtmanfred/2017.7

Update kitchen to use runtests verifier on 2017.7
This commit is contained in:
Daniel Wallace 2017-12-31 11:13:27 -07:00 committed by GitHub
commit 1b3f3ba1be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 12 deletions

8
.gitignore vendored
View file

@ -92,7 +92,9 @@ tests/integration/cloud/providers/pki/minions
# Ignore tox virtualenvs
/.tox/
# Ignore kitchen stuff
.kitchen
.bundle
# Kitchen tests files
.kitchen.local.yml
.kitchen/
.bundle/
Gemfile.lock
/artifacts/

View file

@ -3,6 +3,7 @@
<% version = '2017.7.1' %>
<% platformsfile = ENV['SALT_KITCHEN_PLATFORMS'] || '.kitchen/platforms.yml' %>
<% driverfile = ENV['SALT_KITCHEN_DRIVER'] || '.kitchen/driver.yml' %>
<% verifierfile = ENV['SALT_KITCHEN_VERIFIER'] || '.kitchen/verifier.yml' %>
<% if File.exists?(driverfile) %>
<%= ERB.new(File.read(driverfile)).result %>
@ -52,7 +53,6 @@ provisioner:
base:
"*":
- git.salt
- kitchen
<% if File.exists?(platformsfile) %>
<%= ERB.new(File.read(platformsfile)).result %>
<% else %>
@ -156,6 +156,8 @@ platforms:
<% end %>
suites:
- name: py2
verifier:
python_bin: python2.7
provisioner:
pillars:
top.sls:
@ -170,6 +172,8 @@ suites:
excludes:
- centos-6
- ubuntu-14.04
verifier:
python_bin: python3
provisioner:
pillars:
top.sls:
@ -181,12 +185,23 @@ suites:
clone_repo: false
py3: true
salttesting_namespec: salttesting==2017.6.1
verifier:
name: shell
remote_exec: true
live_stream: {}
<% if ENV['TESTOPTS'].nil? %>
command: 'sudo -E $(kitchen) /tmp/kitchen/testing/tests/runtests.py -v --run-destructive --sysinfo --transport=zeromq --output-columns=80 --ssh --coverage-xml=/tmp/coverage.xml --xml=/tmp/xml-unittests-output'
<% if File.exists?(verifierfile) %>
<%= ERB.new(File.read(verifierfile)).result %>
<% else %>
command: 'sudo -E $(kitchen) /tmp/kitchen/testing/tests/runtests.py -v --run-destructive --output-columns 80 <%= ENV["TESTOPTS"] %>'
verifier:
name: runtests
sudo: true
verbose: true
run_destructive: true
transport: zeromq
types:
- ssh
xml: /tmp/xml-unittests-output/
coverage_xml: /tmp/coverage.xml
save:
/tmp/xml-unittests-output: artifacts/
/tmp/coverage.xml: artifacts/coverage/coverage.xml
/var/log/salt/minion: artifacts/logs/minion
/tmp/salt-runtests.log: artifacts/logs/salt-runtests.log
<% end %>

View file

@ -2,7 +2,7 @@
source 'https://rubygems.org'
gem 'test-kitchen'
gem 'test-kitchen', :git => 'https://github.com/test-kitchen/test-kitchen.git'
gem 'kitchen-salt', :git => 'https://github.com/saltstack/kitchen-salt.git'
gem 'kitchen-sync'
gem 'git'