Rakefile in puppet-strings-1.0.0 vs Rakefile in puppet-strings-1.1.0
- old
+ new
@@ -19,28 +19,38 @@
end
task :acceptance do
require 'beaker-hostgenerator'
+ install_type = 'aio'
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'
- ENV['platform'] = target
+ target = "centos7-64ma{type=#{install_type}}"
end
+ unless target =~ /type=/
+ puts "INFO: adding 'type=#{install_type}' to host config"
+ target += "{type=#{install_type}}"
+ 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 file:"
puts nodeset
sh 'gem build puppet-strings.gemspec'
sh 'puppet module build spec/fixtures/acceptance/modules/test'
- sh "BEAKER_set=#{ENV['platform']} rspec spec/acceptance/*.rb"
+ if ENV['BEAKER_keyfile']
+ sh "BEAKER_set=#{target} rspec spec/acceptance/*.rb"
+ else
+ sh "BEAKER_keyfile=$HOME/.ssh/id_rsa-acceptance BEAKER_set=#{target} rspec spec/acceptance/*.rb"
+ end
end
task(:rubocop) do
require 'rubocop'
cli = RuboCop::CLI.new