Update testing with new platforms

This commit is contained in:
Tim Smith 2016-04-01 11:52:35 -07:00
parent d560ae593d
commit 110c8a00db
6 changed files with 37 additions and 32 deletions

View File

@ -7,7 +7,21 @@ driver:
privileged: true
platforms:
- name: centos-7.1
- name: centos-5
driver:
image: centos:5
platform: rhel
run_command: /sbin/init
provision_command:
- /usr/bin/yum install -y initscripts net-tools wget
- name: centos-6
driver:
image: centos:6
platform: rhel
run_command: /sbin/init
provision_command:
- /usr/bin/yum install -y initscripts net-tools wget
- name: centos-7
driver:
image: centos:7
platform: rhel

View File

@ -5,13 +5,17 @@ provisioner:
name: chef_zero
platforms:
- name: centos-5.11
- name: centos-6.7
- name: centos-7.1
- name: debian-7.8
- name: centos-7.2
- name: debian-7.9
run_list: apt::default
- name: debian-8.1
- name: debian-8.2
run_list: apt::default
- name: fedora-21
- name: fedora-22
run_list: yum::dnf_yum_compat
- name: fedora-23
run_list: yum::dnf_yum_compat
- name: ubuntu-12.04
run_list: apt::default
- name: ubuntu-14.04

View File

@ -16,17 +16,19 @@ Encoding:
Enabled: false
Style/FileName:
Enabled: false
Style/Alias:
Enabled: false
Style/SpaceBeforeFirstArg:
Enabled: false
LineLength:
Enabled: false
MethodLength:
Enabled: false
Metrics/AbcSize:
Enabled: false
PerceivedComplexity:
Metrics/ModuleLength:
Enabled: false
SingleSpaceBeforeFirstArg:
PerceivedComplexity:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
Style/FileName:
Enabled: false

View File

@ -12,9 +12,11 @@ services: docker
env:
matrix:
- INSTANCE=default-ubuntu-1404
- INSTANCE=default-ubuntu-1204
- INSTANCE=default-centos-71
- INSTANCE=default-ubuntu-1404
- INSTANCE=default-centos-5
- INSTANCE=default-centos-6
- INSTANCE=default-centos-7
# Don't `bundle install`
install: echo "skip bundle install"
@ -30,6 +32,6 @@ script:
- /opt/chefdk/embedded/bin/rubocop --version
- /opt/chefdk/embedded/bin/rubocop
- /opt/chefdk/embedded/bin/foodcritic --version
- /opt/chefdk/embedded/bin/foodcritic . --exclude spec
- /opt/chefdk/embedded/bin/foodcritic . --exclude spec -f any
- /opt/chefdk/embedded/bin/rspec
- KITCHEN_LOCAL_YAML=.kitchen.docker.yml /opt/chefdk/embedded/bin/kitchen verify ${INSTANCE}

View File

@ -3,6 +3,7 @@ source 'https://supermarket.chef.io'
metadata
group :integration do
cookbook 'yum'
cookbook 'apt'
cookbook 'fake', path: 'test/fixtures/cookbooks/fake'
cookbook 'wrapper', path: 'test/fixtures/cookbooks/wrapper'

View File

@ -13,8 +13,7 @@ namespace :style do
desc 'Run Chef style checks'
FoodCritic::Rake::LintTask.new(:chef) do |t|
t.options = {
fail_tags: ['any'],
tags: ['~FC005']
fail_tags: ['any']
}
end
end
@ -35,27 +34,10 @@ namespace :integration do
instance.test(:always)
end
end
desc 'Run Test Kitchen with cloud plugins'
task :cloud do
run_kitchen = true
if ENV['TRAVIS'] == 'true' && ENV['TRAVIS_PULL_REQUEST'] != 'false'
run_kitchen = false
end
if run_kitchen
Kitchen.logger = Kitchen.default_file_logger
@loader = Kitchen::Loader::YAML.new(project_config: './.kitchen.cloud.yml')
config = Kitchen::Config.new(loader: @loader)
config.instances.each do |instance|
instance.test(:always)
end
end
end
end
desc 'Run all tests on Travis'
task travis: ['style', 'spec', 'integration:cloud']
# Default
task default: ['style', 'spec', 'integration:vagrant']
task default: %w(style spec)