Revision 16a3486e
Added by Michael Moll about 7 years ago
Gemfile | ||
---|---|---|
|
||
source 'https://rubygems.org'
|
||
|
||
gem 'puppet', ENV.key?('PUPPET_VERSION') ? "~> #{ENV['PUPPET_VERSION']}" : '>= 2.7'
|
||
gem 'puppet', ENV.key?('PUPPET_VERSION') ? "~> #{ENV['PUPPET_VERSION']}" : '>= 3.5'
|
||
|
||
gem 'rake'
|
||
gem 'rspec', '~> 3.0'
|
||
... | ... | |
gem 'puppet-blacksmith', '>= 3.1.0', {"groups"=>["development"]}
|
||
gem 'json', '~> 1.0', {"platforms"=>["ruby_19"], "groups"=>["test"]}
|
||
gem 'json_pure', '~> 1.0', {"platforms"=>["ruby_19"], "groups"=>["test"]}
|
||
gem 'logging', '~> 2.1.0', {"platforms"=>["ruby_19"], "groups"=>["test"]}
|
||
gem 'beaker-rspec', {"groups"=>["system_tests"]}
|
||
gem 'beaker-puppet_install_helper', {"groups"=>["system_tests"]}
|
||
gem 'metadata-json-lint'
|
||
gem 'kafo_module_lint'
|
||
|
spec/acceptance/nodesets/docker/centos-6.yml | ||
---|---|---|
---
|
||
# This file is managed via modulesync
|
||
# https://github.com/voxpupuli/modulesync
|
||
# https://github.com/theforeman/foreman-installer-modulesync
|
||
HOSTS:
|
||
centos-6-x64:
|
||
platform: el-6-x86_64
|
||
hypervisor: docker
|
||
image: centos:6
|
||
docker_preserve_image: true
|
||
docker_cmd: '["/sbin/init"]'
|
||
docker_image_commands:
|
||
- 'rm -rf /var/run/network/*'
|
||
- 'yum install -y crontabs initscripts iproute openssl sysvinit-tools tar wget which'
|
||
- 'rm /etc/init/tty.conf'
|
||
CONFIG:
|
||
trace_limit: 200
|
||
masterless: true
|
||
...
|
||
# vim: syntax=yaml
|
spec/acceptance/nodesets/docker/centos-7.yml | ||
---|---|---|
---
|
||
# This file is managed via modulesync
|
||
# https://github.com/voxpupuli/modulesync
|
||
# https://github.com/theforeman/foreman-installer-modulesync
|
||
HOSTS:
|
||
centos-7-x64:
|
||
platform: el-7-x86_64
|
||
hypervisor: docker
|
||
image: centos:7
|
||
docker_preserve_image: true
|
||
docker_cmd: '["/usr/sbin/init"]'
|
||
docker_image_commands:
|
||
- 'yum install -y crontabs initscripts iproute openssl sysvinit-tools tar wget which ss'
|
||
- 'systemctl mask getty@tty1.service'
|
||
CONFIG:
|
||
trace_limit: 200
|
||
masterless: true
|
||
...
|
||
# vim: syntax=yaml
|
spec/acceptance/nodesets/docker/debian-8.yml | ||
---|---|---|
---
|
||
# This file is managed via modulesync
|
||
# https://github.com/voxpupuli/modulesync
|
||
# https://github.com/theforeman/foreman-installer-modulesync
|
||
HOSTS:
|
||
debian-8-x64:
|
||
platform: debian-8-amd64
|
||
hypervisor: docker
|
||
image: debian:8
|
||
docker_preserve_image: true
|
||
docker_cmd: '["/sbin/init"]'
|
||
docker_image_commands:
|
||
- 'apt-get update && apt-get install -y cron locales-all net-tools wget'
|
||
- 'rm -f /usr/sbin/policy-rc.d'
|
||
- 'systemctl mask getty@tty1.service getty-static.service'
|
||
CONFIG:
|
||
trace_limit: 200
|
||
masterless: true
|
||
...
|
||
# vim: syntax=yaml
|
spec/acceptance/nodesets/docker/ubuntu-14.04.yml | ||
---|---|---|
---
|
||
# This file is managed via modulesync
|
||
# https://github.com/voxpupuli/modulesync
|
||
# https://github.com/theforeman/foreman-installer-modulesync
|
||
HOSTS:
|
||
ubuntu-1404-x64:
|
||
platform: ubuntu-14.04-amd64
|
||
hypervisor: docker
|
||
image: ubuntu:14.04
|
||
docker_preserve_image: true
|
||
docker_cmd: '["/sbin/init"]'
|
||
docker_image_commands:
|
||
- 'rm /usr/sbin/policy-rc.d'
|
||
- 'rm /sbin/initctl; dpkg-divert --rename --remove /sbin/initctl'
|
||
- 'apt-get install -y net-tools wget'
|
||
- 'locale-gen en_US.UTF-8'
|
||
CONFIG:
|
||
trace_limit: 200
|
||
masterless: true
|
||
...
|
||
# vim: syntax=yaml
|
spec/acceptance/nodesets/docker/ubuntu-16.04.yml | ||
---|---|---|
---
|
||
# This file is managed via modulesync
|
||
# https://github.com/voxpupuli/modulesync
|
||
# https://github.com/theforeman/foreman-installer-modulesync
|
||
HOSTS:
|
||
ubuntu-1604-x64:
|
||
platform: ubuntu-16.04-amd64
|
||
hypervisor: docker
|
||
image: ubuntu:16.04
|
||
docker_preserve_image: true
|
||
docker_cmd: '["/sbin/init"]'
|
||
docker_image_commands:
|
||
- 'apt-get install -y net-tools wget'
|
||
- 'locale-gen en_US.UTF-8'
|
||
CONFIG:
|
||
trace_limit: 200
|
||
masterless: true
|
||
...
|
||
# vim: syntax=yaml
|
spec/spec_helper_acceptance.rb | ||
---|---|---|
require 'beaker-rspec/spec_helper'
|
||
require 'beaker-rspec/helpers/serverspec'
|
||
require 'beaker/puppet_install_helper'
|
||
|
||
run_puppet_install_helper unless ENV['BEAKER_provision'] == 'no'
|
||
|
||
RSpec.configure do |c|
|
||
# Project root
|
||
proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
||
|
||
# Readable test descriptions
|
||
c.formatter = :documentation
|
||
|
||
# Configure all nodes in nodeset
|
||
c.before :suite do
|
||
# Install module and dependencies
|
||
puppet_module_install(:source => proj_root, :module_name => 'dns')
|
||
hosts.each do |host|
|
||
["puppetlabs-stdlib"].each do |mod|
|
||
on host, puppet('module', 'install', mod), { :acceptable_exit_codes => [0] }
|
||
end
|
||
|
||
if fact_on(host, 'osfamily') == 'RedHat'
|
||
# don't delete downloaded rpm for use with BEAKER_provision=no +
|
||
# BEAKER_destroy=no
|
||
on host, 'sed -i "s/keepcache=.*/keepcache=1/" /etc/yum.conf'
|
||
# refresh check if cache needs refresh on next yum command
|
||
on host, 'yum clean expire-cache'
|
||
end
|
||
end
|
||
end
|
||
end
|
||
|
||
shared_examples 'a idempotent resource' do
|
||
it 'applies with no errors' do
|
||
apply_manifest(pp, catch_failures: true)
|
||
end
|
||
|
||
it 'applies a second time without changes' do
|
||
apply_manifest(pp, catch_changes: true)
|
||
end
|
||
end
|
Also available in: Unified diff
add beaker, pin logging for Ruby 1.9