From 5908cc795d98bb68d1471b8add813aa9fa46334d Mon Sep 17 00:00:00 2001 From: Eric Thompson Date: Tue, 7 Feb 2017 00:32:58 +0000 Subject: [PATCH] (PDOC-144) acceptance: fix windows pre-suite * windows install requires type=aio so gem_command can find the right gem exe * this change also allows easier command line use * by using a sensible default for the acceptance key [skip ci] --- Rakefile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index 0c42119..981220d 100644 --- a/Rakefile +++ b/Rakefile @@ -21,12 +21,17 @@ end task :acceptance do require 'beaker-hostgenerator' + install_type = 'aio' target = ENV['platform'] + unless target =~ /type=/ + puts "INFO: adding 'type=#{install_type}' to host config" + target += "{type=#{install_type}}" + end + 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 cli = BeakerHostGenerator::CLI.new([target]) @@ -36,10 +41,15 @@ task :acceptance do 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