diff --git a/.travis.yml b/.travis.yml index ad5ca57..2fe7fb9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,40 +1,40 @@ --- # This file is managed centrally by modulesync # https://github.com/theforeman/foreman-installer-modulesync rvm: - 2.1.9 - 2.3.0 - 2.4.1 env: matrix: - PUPPET_VERSION=4.9 global: - PARALLEL_TEST_PROCESSORS=8 matrix: fast_finish: true include: - rvm: 2.4.1 env: PUPPET_VERSION=5.0 - rvm: 2.5.1 env: PUPPET_VERSION=5.0 # Acceptance tests - rvm: 2.5.1 dist: trusty - env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=pc1 BEAKER_debug=true BEAKER_setfile=centos7-64{hypervisor=docker\,hostname=centos7-64.example.com} + env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=pc1 BEAKER_debug=true BEAKER_setfile=centos7-64{hypervisor=docker\,hostname=centos7-64.example.com} script: bundle exec rake beaker services: docker bundler_args: --without development - rvm: 2.5.1 dist: trusty - env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=pc1 BEAKER_debug=true BEAKER_setfile=centos6-64{hypervisor=docker\,hostname=centos6-64.example.com} + env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=pc1 BEAKER_debug=true BEAKER_setfile=centos6-64{hypervisor=docker\,hostname=centos6-64.example.com} script: bundle exec rake beaker services: docker bundler_args: --without development - rvm: 2.5.1 dist: trusty - env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=pc1 BEAKER_debug=true BEAKER_setfile=debian8-64{hypervisor=docker\,hostname=debian8-64.example.com} + env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=pc1 BEAKER_debug=true BEAKER_setfile=debian8-64{hypervisor=docker\,hostname=debian8-64.example.com} script: bundle exec rake beaker services: docker bundler_args: --without development bundler_args: --without system_tests development sudo: false diff --git a/Gemfile b/Gemfile index 0d479ea..4639be0 100644 --- a/Gemfile +++ b/Gemfile @@ -1,41 +1,43 @@ # This file is managed centrally by modulesync # https://github.com/theforeman/foreman-installer-modulesync source 'https://rubygems.org' gem 'puppet', ENV.key?('PUPPET_VERSION') ? "~> #{ENV['PUPPET_VERSION']}" : '>= 4.6' gem 'rake' gem 'rspec', '~> 3.0' gem 'rdoc', '~> 5.1.0', {"platforms"=>["ruby_21"]} gem 'rspec-puppet', '~> 2.3' gem 'rspec-puppet-facts', '>= 1.7' gem 'puppetlabs_spec_helper', '>= 2.1.1' gem 'puppet-lint', '>= 2' gem 'puppet-lint-absolute_classname-check' gem 'puppet-lint-classes_and_types_beginning_with_digits-check' gem 'puppet-lint-empty_string-check' gem 'puppet-lint-file_ensure-check' gem 'puppet-lint-leading_zero-check' gem 'puppet-lint-param-docs', '>= 1.3.0' gem 'puppet-lint-spaceship_operator_without_tag-check' gem 'puppet-lint-strict_indent-check' gem 'puppet-lint-trailing_comma-check' gem 'puppet-lint-undef_in_function-check' gem 'puppet-lint-unquoted_string-check' gem 'puppet-lint-variable_contains_upcase' gem 'puppet-lint-version_comparison-check' gem 'simplecov' gem 'github_changelog_generator', {"git"=>"https://github.com/skywinder/github-changelog-generator", "ref"=>"20ee04ba1234e9e83eb2ffb5056e23d641c7a018", "groups"=>["development"]} gem 'puppet-blacksmith', '>= 4.1.0', {"groups"=>["development"]} -gem 'beaker', '>= 3.9.0', {"groups"=>["system_tests"]} +gem 'beaker', '>= 4.0.0', {"groups"=>["system_tests"]} +gem 'beaker-docker', {"groups"=>["system_tests"]} gem 'beaker-hostgenerator', '>= 1.1.10', {"groups"=>["system_tests"]} +gem 'beaker-puppet', {"groups"=>["system_tests"]} gem 'beaker-rspec', {"groups"=>["system_tests"]} gem 'beaker-module_install_helper', {"groups"=>["system_tests"]} gem 'beaker-puppet_install_helper', {"groups"=>["system_tests"]} gem 'metadata-json-lint' gem 'kafo_module_lint' gem 'rgen' gem 'parallel_tests' # vim:ft=ruby diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index f8b4ef7..f9ef8f0 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -1,46 +1,46 @@ -require 'beaker-rspec/spec_helper' -require 'beaker-rspec/helpers/serverspec' +require 'beaker-puppet' +require 'beaker-rspec' require 'beaker/puppet_install_helper' require 'beaker/module_install_helper' run_puppet_install_helper unless ENV['BEAKER_provision'] == 'no' install_module_on(hosts) install_module_dependencies_on(hosts) RSpec.configure do |c| # Readable test descriptions c.formatter = :documentation # Configure all nodes in nodeset c.before :suite do # Install module and dependencies hosts.each do |host| 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 shared_examples 'the example' do |name| let(:pp) do path = File.join(File.dirname(File.dirname(__FILE__)), 'examples', name) File.read(path) end include_examples 'a idempotent resource' end