Merge pull request #89 from smcelmurry/qeng-3888

(QENG-3888) Remove static nodeset, use beaker-hostgenerator
This commit is contained in:
Hailee Kenney 2016-06-21 11:26:27 -07:00 committed by GitHub
commit b39409ae79
3 changed files with 18 additions and 17 deletions

View File

@ -24,6 +24,7 @@ end
group :acceptance do
gem 'beaker'
gem 'beaker-rspec'
gem 'beaker-hostgenerator'
end
group :development do

View File

@ -18,6 +18,23 @@ task :validate do
end
task :acceptance do
require 'beaker-hostgenerator'
target = ENV['platform']
if ! target
STDERR.puts 'TEST_TARGET environment variable is not set'
STDERR.puts 'setting to default value of "centos7-64ma."'
target = 'centos7-64ma.'
end
cli = BeakerHostGenerator::CLI.new([target])
nodeset_dir = "spec/acceptance/nodesets"
nodeset = "#{nodeset_dir}/#{target}.yml"
FileUtils.mkdir_p(nodeset_dir)
File.open(nodeset, 'w') do |fh|
fh.print(cli.execute)
end
puts nodeset
sh "gem build puppet-strings.gemspec"
sh "puppet module build spec/unit/puppet/examples/test"
sh "BEAKER_set=#{ENV["platform"]} rspec spec/acceptance/*.rb"

View File

@ -1,17 +0,0 @@
---
HOSTS:
centos7-64-1:
pe_dir:
pe_ver:
pe_upgrade_dir:
pe_upgrade_ver:
hypervisor: vmpooler
platform: el-7-x86_64
template: centos-7-x86_64
roles:
- agent
- master
CONFIG:
nfs_server: none
consoleport: 443
pooling_api: http://vmpooler.delivery.puppetlabs.net/