Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use voxpupuli-acceptance #57

Merged
merged 1 commit into from
Apr 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.travis.yml:
secure: "ZiCBVZ7uHSaUcNQZiayFta9Iy1N0/lzVDMIL7jLzGyIxig4eX6vMEaEbmLCDP0XjnUSDtxh4G6C43BKMlvFtpl+fs41ZSC/b/FRCsYADkl7algl3+vzOSlC+x0R303/KisizETnGZaqvgUDRtyogZiitYumxuJ/bkQcDgJ+3W/8="
spec/spec_helper_acceptance.rb:
unmanaged: false
28 changes: 4 additions & 24 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/acceptance/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