From 9ff94048165c430118f9691cc79fd7515d7234b6 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Mon, 6 Apr 2020 23:12:53 +0200 Subject: [PATCH] Use voxpupuli-acceptance --- .sync.yml | 2 ++ Gemfile | 28 +++----------------- spec/spec_helper_acceptance.rb | 48 ++-------------------------------- 3 files changed, 8 insertions(+), 70 deletions(-) diff --git a/.sync.yml b/.sync.yml index 41983e2..78671db 100644 --- a/.sync.yml +++ b/.sync.yml @@ -1,2 +1,4 @@ .travis.yml: secure: "ZiCBVZ7uHSaUcNQZiayFta9Iy1N0/lzVDMIL7jLzGyIxig4eX6vMEaEbmLCDP0XjnUSDtxh4G6C43BKMlvFtpl+fs41ZSC/b/FRCsYADkl7algl3+vzOSlC+x0R303/KisizETnGZaqvgUDRtyogZiitYumxuJ/bkQcDgJ+3W/8=" +spec/spec_helper_acceptance.rb: + managed: true diff --git a/Gemfile b/Gemfile index 4d187cc..32c3114 100644 --- a/Gemfile +++ b/Gemfile @@ -11,9 +11,9 @@ def location_for(place, fake_version = nil) end group :test do - gem 'voxpupuli-test', :require => false - gem 'coveralls', :require => false - gem 'simplecov-console', :require => false + gem 'voxpupuli-test', '>= 1.0.0', :require => false + gem 'coveralls', :require => false + gem 'simplecov-console', :require => false end group :development do @@ -24,27 +24,7 @@ group :development do end group :system_tests do - gem 'winrm', :require => false - if beaker_version = ENV['BEAKER_VERSION'] - gem 'beaker', *location_for(beaker_version) - else - gem 'beaker', '>= 4.2.0', :require => false - end - if beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION'] - gem 'beaker-rspec', *location_for(beaker_rspec_version) - else - gem 'beaker-rspec', :require => false - end - gem 'serverspec', :require => false - gem 'beaker-hostgenerator', '>= 1.1.22', :require => false - gem 'beaker-docker', :require => false - gem 'beaker-puppet', :require => false - gem 'beaker-puppet_install_helper', :require => false - gem 'beaker-module_install_helper', :require => false - gem 'rbnacl', '>= 4', :require => false - gem 'rbnacl-libsodium', :require => false - gem 'bcrypt_pbkdf', :require => false - gem 'ed25519', :require => false + gem 'voxpupuli-acceptance', :require => false end group :release do diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 2afe009..69d431c 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -1,47 +1,3 @@ -require 'puppet' -require 'beaker-rspec/spec_helper' -require 'beaker-rspec/helpers/serverspec' +require 'voxpupuli/test/spec_helper_acceptance' -# overriding puppet installation for the RedHat family distros due to -# puppet breakage >= 3.5 -def install_puppet(host) - host['platform'] =~ %r{(fedora|el)-(\d+)} - if host['platform'] =~ %r{(fedora|el)-(\d+)} - safeversion = '3.4.2' - platform = Regexp.last_match(1) - relver = Regexp.last_match(2) - on host, "rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-#{platform}-#{relver}.noarch.rpm" - on host, "yum install -y puppet-#{safeversion}" - else - super() - end -end - -RSpec.configure do |c| - # Project root - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) - - c.before(:each) do - Puppet::Util::Log.level = :warning - Puppet::Util::Log.newdestination(:console) - end - - c.before :suite do - hosts.each do |host| - unless ENV['RS_PROVISION'] == 'no' || ENV['BEAKER_provision'] == 'no' - begin - on host, 'puppet --version' - rescue - if host.is_pe? - install_pe - else - install_puppet(host) - end - end - end - - # Install module and dependencies - puppet_module_install(source: proj_root, module_name: File.basename(proj_root).gsub(%r{^puppet-}, '')) - end - end -end +configure_beaker