From c6de41e6b9c8d75fe6cb1dfb3acc8608ee99ac69 Mon Sep 17 00:00:00 2001 From: Spencer McElmurry Date: Mon, 20 Jun 2016 14:13:41 -0700 Subject: [PATCH] (QENG-3888) Remove static nodeset, use beaker-hostgenerator This is additional work for QENG-3888 in ci-job-configs. We were using static nodesets within specs/acceptance/nodesets before and this commit will instead use beaker-hostgenerator to get the specified platform .yml configurations. --- Gemfile | 1 + Rakefile | 17 +++++++++++++++++ spec/acceptance/nodesets/centos7.yml | 17 ----------------- 3 files changed, 18 insertions(+), 17 deletions(-) delete mode 100644 spec/acceptance/nodesets/centos7.yml diff --git a/Gemfile b/Gemfile index 5a27a60..6f9004a 100644 --- a/Gemfile +++ b/Gemfile @@ -24,6 +24,7 @@ end group :acceptance do gem 'beaker' gem 'beaker-rspec' + gem 'beaker-hostgenerator' end group :development do diff --git a/Rakefile b/Rakefile index 5ca19fd..459dda0 100644 --- a/Rakefile +++ b/Rakefile @@ -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" diff --git a/spec/acceptance/nodesets/centos7.yml b/spec/acceptance/nodesets/centos7.yml deleted file mode 100644 index 216f639..0000000 --- a/spec/acceptance/nodesets/centos7.yml +++ /dev/null @@ -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/