Skip to content

Commit

Permalink
Use voxpupuli-acceptance
Browse files Browse the repository at this point in the history
  • Loading branch information
ekohl committed Apr 6, 2020
1 parent 8b5e386 commit ececd1c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 67 deletions.
2 changes: 2 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---
.travis.yml:
secure: "Wb5Hs28JNnFp4ZuQp4KTzUDfT3hXK5QW50e25gFULXjIY1+/vmhxb43Wl27lL+8/vRRe+1t3z0AIrZiYYapQWgWGfvAaBux1tRVTprWme4YqURMNSW4bxXVtYpCA4O0HiTJq6WZoRT9+/LRmEPnyBHSackgYKF0R4/LnZGfK0AY="
spec/spec_helper_acceptance.rb:
managed: true
22 changes: 1 addition & 21 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
48 changes: 2 additions & 46 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ececd1c

Please sign in to comment.