beaker-puppet 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7e8e07f8616629904fa0d1a0dafb32f81c9c3c68
4
- data.tar.gz: 027a86d8fa7512e09769d3c3baadc70d6a52664b
3
+ metadata.gz: 67910822a7a31f6110eb886e0531e411fd715d32
4
+ data.tar.gz: e2357ba3923f4dd77dacd9315de20b1aa3e71587
5
5
  SHA512:
6
- metadata.gz: 5350380ad4d9901b7a18b7174e9e7ca04494d46ad5148605a349f72016a1bec17a15a56cf75a47a02fe31c26ea024584cb171792585d64a5bb0ec4863c0ca54b
7
- data.tar.gz: a30b47610782db0029b33f8514271ca8af9e07785d3436f4bcd0681e0b162a2440e3700d52110b293557052a78c2fc72b0e494620fd778d72abd708845c0aaaa
6
+ metadata.gz: 321b51f3bad241af73abc86d741621a044b88ff40ccb8224e556e90b11dc94f2540d2001e74ce4417e27a95996183db7129e0172e4ee4d1c4abe21a4f17f4435
7
+ data.tar.gz: a77c9bf6335c681663137c07a6ad7078119a70fb933fbc480d007225798a6abe54ab6a07825cbfc41fc35bc0e6acdf4d1dd2a4de1e79298b00f88d9e715b18ec
@@ -828,7 +828,7 @@ module Beaker
828
828
  def sign_certificate_for(host = [])
829
829
  hostnames = []
830
830
  hosts = host.is_a?(Array) ? host : [host]
831
- puppet_version = on(master, puppet('--version'))
831
+ puppet_version = on(master, puppet('--version')).stdout.chomp
832
832
  hosts.each{ |current_host|
833
833
  if [master, dashboard, database].include? current_host
834
834
  on current_host, puppet( 'agent -t' ), :acceptable_exit_codes => [0,1,2]
@@ -69,7 +69,7 @@ module Beaker
69
69
  # @api private
70
70
  def ezbake_validate_support host
71
71
  variant, version, _, _ = host['platform'].to_array
72
- unless variant =~ /^(fedora|el|centos|debian|ubuntu)$/
72
+ unless variant =~ /^(fedora|el|redhat|centos|debian|ubuntu)$/
73
73
  raise RuntimeError,
74
74
  "No support for #{variant} within ezbake_utils ..."
75
75
  end
@@ -347,7 +347,7 @@ module Beaker
347
347
  add_role(host, 'aio') #we are installing agent, so we want aio role
348
348
  package_name = nil
349
349
  case host['platform']
350
- when /el-|fedora|sles|centos|cisco_/
350
+ when /el-|redhat|fedora|sles|centos|cisco_/
351
351
  package_name = 'puppet-agent'
352
352
  package_name << "-#{opts[:puppet_agent_version]}" if opts[:puppet_agent_version]
353
353
  when /debian|ubuntu|cumulus|huaweios/
@@ -941,8 +941,8 @@ module Beaker
941
941
  opts = FOSS_DEFAULT_DOWNLOAD_URLS.merge(opts)
942
942
 
943
943
  case variant
944
- when /^(fedora|el|centos|sles|cisco_nexus|cisco_ios_xr)$/
945
- variant_url_value = (($1 == 'centos') ? 'el' : $1)
944
+ when /^(fedora|el|redhat|centos|sles|cisco_nexus|cisco_ios_xr)$/
945
+ variant_url_value = ((['redhat','centos'].include?($1)) ? 'el' : $1)
946
946
  if variant == 'cisco_nexus'
947
947
  variant_url_value = 'cisco-wrlinux'
948
948
  version = '5'
@@ -1090,7 +1090,7 @@ module Beaker
1090
1090
  repo_configs_dir = nil,
1091
1091
  opts = options )
1092
1092
  variant, version, arch, codename = host['platform'].to_array
1093
- if variant !~ /^(fedora|el|centos|debian|ubuntu|cumulus|huaweios|cisco_nexus|cisco_ios_xr|sles)$/
1093
+ if variant !~ /^(fedora|el|redhat|centos|debian|ubuntu|cumulus|huaweios|cisco_nexus|cisco_ios_xr|sles)$/
1094
1094
  raise "No repository installation step for #{variant} yet..."
1095
1095
  end
1096
1096
  repo_configs_dir ||= 'tmp/repo_configs'
@@ -1103,7 +1103,7 @@ module Beaker
1103
1103
  # url type
1104
1104
  _, protocol, hostname = opts[:dev_builds_url].partition /.*:\/\//
1105
1105
  dev_builds_url = protocol + hostname
1106
- dev_builds_url = opts[:dev_builds_url] if variant =~ /^(fedora|el|centos)$/
1106
+ dev_builds_url = opts[:dev_builds_url] if variant =~ /^(fedora|el|redhat|centos)$/
1107
1107
 
1108
1108
  if variant =~ /^ubuntu$/ && version.split('.').first.to_i >= 18
1109
1109
  # Allow the use of unsigned repos with Ubuntu 18.04+
@@ -1130,7 +1130,7 @@ module Beaker
1130
1130
  if host['platform'] =~ /debian|ubuntu|cumulus|huaweios/
1131
1131
  find_filename = '*.deb'
1132
1132
  find_command = 'dpkg -i'
1133
- elsif host['platform'] =~ /fedora|el|centos/
1133
+ elsif host['platform'] =~ /fedora|el|redhat|centos/
1134
1134
  find_filename = '*.rpm'
1135
1135
  find_command = 'rpm -ivh'
1136
1136
  else
@@ -1203,7 +1203,7 @@ module Beaker
1203
1203
  onhost_copy_base = opts[:copy_dir_external] || host.external_copy_base
1204
1204
 
1205
1205
  case variant
1206
- when /^(fedora|el|centos|debian|ubuntu|cumulus|huaweios|cisco_nexus|cisco_ios_xr)$/
1206
+ when /^(fedora|el|redhat|centos|debian|ubuntu|cumulus|huaweios|cisco_nexus|cisco_ios_xr)$/
1207
1207
  if arch== 's390x' || host['hypervisor'] == 'ec2'
1208
1208
  logger.trace("#install_puppet_agent_dev_repo_on: unsupported host #{host} for repo detected. using dev package")
1209
1209
  else
@@ -1236,12 +1236,12 @@ module Beaker
1236
1236
  case variant
1237
1237
  when /^eos/
1238
1238
  host.install_from_file( release_file )
1239
- when /^(sles|aix|fedora|el|centos)$/
1239
+ when /^(sles|aix|fedora|el|redhat|centos)$/
1240
1240
  # NOTE: AIX does not support repo management. This block assumes
1241
1241
  # that the desired rpm has been mirrored to the 'repos' location.
1242
1242
  # NOTE: the AIX 7.1 package will only install on 7.2 with
1243
1243
  # --ignoreos. This is a bug in package building on AIX 7.1's RPM
1244
- if variant == "aix" and version == "7.2"
1244
+ if variant == "aix" && version == "7.2"
1245
1245
  aix_72_ignoreos_hack = "--ignoreos"
1246
1246
  end
1247
1247
  on host, "rpm -ivh #{aix_72_ignoreos_hack} #{onhost_copied_file}"
@@ -1,3 +1,3 @@
1
1
  module BeakerPuppet
2
- VERSION = '1.4.0'
2
+ VERSION = '1.5.0'
3
3
  end
@@ -2,7 +2,7 @@ test_name "Validate Sign Cert" do
2
2
  skip_test 'not testing with puppetserver' unless @options['is_puppetserver']
3
3
  hostname = on(master, 'facter hostname').stdout.strip
4
4
  fqdn = on(master, 'facter fqdn').stdout.strip
5
- puppet_version = on(master, puppet("--version")).stdout
5
+ puppet_version = on(master, puppet("--version")).stdout.chomp
6
6
 
7
7
  if master.use_service_scripts?
8
8
  step "Ensure puppet is stopped"
@@ -657,9 +657,11 @@ describe ClassMixedWithDSLHelpers do
657
657
  arg
658
658
  end
659
659
 
660
- expect( subject ).to receive( :on ).with( master, '--version').once.and_return("6.0.0")
661
- expect( subject ).to receive( :on ).with( master, 'puppetserver ca sign --all', :acceptable_exit_codes => [0, 24]).once
662
- expect( subject ).to receive( :on ).with( master, 'puppetserver ca list --all').once.and_return( result )
660
+ version_result = double("version", :stdout => "6.0.0")
661
+ expect(subject).to receive(:on).with(master, '--version').and_return(version_result)
662
+ expect(subject).to receive(:version_is_less).and_return(false)
663
+ expect(subject).to receive(:on).with(master, 'puppetserver ca sign --all', :acceptable_exit_codes => [0, 24]).once
664
+ expect(subject).to receive(:on).with(master, 'puppetserver ca list --all').once.and_return(result)
663
665
 
664
666
  subject.sign_certificate_for( agent )
665
667
  end
@@ -673,9 +675,11 @@ describe ClassMixedWithDSLHelpers do
673
675
  arg
674
676
  end
675
677
 
676
- expect( subject ).to receive( :on ).with( master, '--version').once.and_return("5.0.0")
677
- expect( subject ).to receive( :on ).with( master, 'cert --sign --all --allow-dns-alt-names', :acceptable_exit_codes => [0, 24]).once
678
- expect( subject ).to receive( :on ).with( master, 'cert --list --all').once.and_return( result )
678
+ version_result = double("version", :stdout => "5.0.0")
679
+ expect(subject).to receive(:on).with(master, '--version').and_return(version_result)
680
+ expect(subject).to receive(:version_is_less).and_return(true)
681
+ expect(subject).to receive(:on).with(master, 'cert --sign --all --allow-dns-alt-names', :acceptable_exit_codes => [0, 24]).once
682
+ expect(subject).to receive(:on).with(master, 'cert --list --all').once.and_return( result )
679
683
 
680
684
  subject.sign_certificate_for( agent )
681
685
  end
@@ -690,7 +694,8 @@ describe ClassMixedWithDSLHelpers do
690
694
  arg
691
695
  end
692
696
 
693
- expect( subject ).to receive( :on ).with( master, "--version").once.and_return("6.0.0")
697
+ version_result = double("version", :stdout => "6.0.0")
698
+ expect(subject).to receive(:on).with(master, '--version').and_return(version_result)
694
699
  expect( subject ).to receive( :on ).with( master, 'puppetserver ca sign --all', :acceptable_exit_codes => [0, 24]).exactly( 11 ).times
695
700
  expect( subject ).to receive( :on ).with( master, 'puppetserver ca list --all').exactly( 11 ).times.and_return( result )
696
701
  expect( subject ).to receive( :fail_test ).once
@@ -708,7 +713,8 @@ describe ClassMixedWithDSLHelpers do
708
713
  arg
709
714
  end
710
715
  expect( subject ).to receive( :on ).with( master, "agent -t", :acceptable_exit_codes => [0, 1, 2]).once
711
- expect( subject ).to receive( :on ).with( master, "--version").once.and_return("6.0.0")
716
+ version_result = double("version", :stdout => "6.0.0")
717
+ expect(subject).to receive(:on).with(master, '--version').and_return(version_result)
712
718
  expect( subject ).to receive( :on ).with( master, "puppetserver ca sign --certname master").once
713
719
  expect( subject ).to receive( :on ).with( master, "puppetserver ca sign --all", :acceptable_exit_codes => [0, 24]).once
714
720
  expect( subject ).to receive( :on ).with( master, "puppetserver ca list --all").once.and_return( result )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-puppet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet