beaker-puppet_install_helper 0.4.2 → 0.4.3

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: 8238bf66282860a17d554708397faf4d2e6a0adb
4
- data.tar.gz: fb006b5ca3e07a31fed44ddaba759fbb7c0f46c5
3
+ metadata.gz: 7b3d3a1e3151b4148cdb24e298c8e89ad4d0e6cf
4
+ data.tar.gz: f200b28636bf0f7e4fae22c56255d82155183b4b
5
5
  SHA512:
6
- metadata.gz: 9914f24a37f7d8e58f62f47d9759a893dd791a81e69d5e41bd4fd1e9932673eaa2f2cc18cd0d99113c19d40a0a7fb612ee0dbaa91b96127dc226bf8942774b1d
7
- data.tar.gz: c3bb58813e192fd100ea2fabc651f7c480fae854316b8cd171d8b4a0870b141041677c2a21a256e5bc246f0f8c58b36f6846f5b204b6ff50dfaebbff808a7932
6
+ metadata.gz: d5ee9086a1545129ed9e0aea4b3c3eb1c687fa6381197f102a251162d33b4dbbf1224813c408588701d6c192ac0d8b16a171b8c2898b0bb9b9f756eba9bee4ea
7
+ data.tar.gz: ce04589ec9651e3acb833cb9e958fd90ab93456da26509614e36933f82891b20b5d656f6e45c03b7c9940a581eac0873defff92ee327de208ff7e92e42fa5daf
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "beaker-puppet_install_helper"
3
- s.version = '0.4.2'
3
+ s.version = '0.4.3'
4
4
  s.authors = ["Puppetlabs"]
5
5
  s.email = ["hunter@puppetlabs.com"]
6
6
  s.homepage = "https://github.com/puppetlabs/beaker-puppet_install_helper"
@@ -19,13 +19,15 @@ module Beaker::CaCertHelper
19
19
  ##
20
20
  def install_ca_certs_on(hosts)
21
21
  [hosts].flatten.each do |host|
22
- get_cert_hash.each do |cert_name, ca|
23
- if host['platform'] =~ /windows/i
24
- create_cert_on_host(host, cert_name, ca)
25
- add_windows_cert host, cert_name
26
- elsif host['platform'] =~ /solaris/i
27
- create_cert_on_host(host, cert_name, ca)
28
- add_solaris_cert host, cert_name
22
+ if host['pe_ver'] and version_is_less(host['pe_ver'], '4.0.0')
23
+ get_cert_hash.each do |cert_name, ca|
24
+ if host['platform'] =~ /windows/i
25
+ create_cert_on_host(host, cert_name, ca)
26
+ add_windows_cert host, cert_name
27
+ elsif host['platform'] =~ /solaris/i
28
+ create_cert_on_host(host, cert_name, ca)
29
+ add_solaris_cert host, cert_name
30
+ end
29
31
  end
30
32
  end
31
33
  end
@@ -44,11 +44,9 @@ module Beaker::PuppetInstallHelper
44
44
 
45
45
  case type
46
46
  when "pe"
47
- # This will skip hosts that are not supported
47
+ # These will skip hosts that are not supported
48
48
  install_pe_on(Array(hosts),options.merge({"pe_ver" => version}))
49
- if version and version_is_less(version, '4.0.0')
50
- install_ca_certs_on(Array(hosts))
51
- end
49
+ install_ca_certs_on(Array(hosts))
52
50
  when "foss"
53
51
  opts = options.merge({
54
52
  :version => version,
@@ -17,7 +17,7 @@ describe 'beaker::ca_cert_helper' do
17
17
  end
18
18
 
19
19
  it "windows 2003 node" do
20
- w2k3 = {"platform" => 'windows-2003r2-64', 'distmoduledir' => '/dne', 'hieraconf' => '/dne'}
20
+ w2k3 = {"pe_ver" => "3.8.3", "platform" => 'windows-2003r2-64', 'distmoduledir' => '/dne', 'hieraconf' => '/dne'}
21
21
 
22
22
  expect(subject).to receive(:add_windows_cert).with(w2k3, 'geotrustglobal.pem')
23
23
  expect(subject).to receive(:create_cert_on_host).with(w2k3, 'geotrustglobal.pem', 'my cert string')
@@ -27,7 +27,7 @@ describe 'beaker::ca_cert_helper' do
27
27
  end
28
28
 
29
29
  it "solaris 11 node" do
30
- sol = {"platform" => 'solaris-11-x86_64', 'distmoduledir' => '/dne', 'hieraconf' => '/dne'}
30
+ sol = {"pe_ver" => "3.8.3", "platform" => 'solaris-11-x86_64', 'distmoduledir' => '/dne', 'hieraconf' => '/dne'}
31
31
 
32
32
  expect(subject).to receive(:add_solaris_cert).with(sol, 'geotrustglobal.pem')
33
33
  expect(subject).to receive(:create_cert_on_host).with(sol, 'geotrustglobal.pem', 'my cert string')
@@ -9,7 +9,9 @@ describe 'beaker::puppet_install_helper' do
9
9
  pe_host = double(:is_pe? => true)
10
10
  allow(foss_host).to receive(:[]).with("distmoduledir").and_return("/dne")
11
11
  allow(foss_host).to receive(:[]).with("platform").and_return("Debian")
12
+ allow(foss_host).to receive(:[]).with("pe_ver").and_return(nil)
12
13
  allow(foss_host).to receive(:puppet).and_return({"hiera_config" => "/dne"})
14
+ allow(pe_host).to receive(:[]).with("pe_ver").and_return("3.8.3")
13
15
  allow(pe_host).to receive(:[]).with("distmoduledir").and_return("/dne")
14
16
  allow(pe_host).to receive(:[]).with("platform").and_return("Debian")
15
17
  allow(pe_host).to receive(:puppet).and_return({"hiera_config" => "/dne"})
@@ -98,7 +100,7 @@ describe 'beaker::puppet_install_helper' do
98
100
  subject.run_puppet_install_helper_on(hosts)
99
101
  end
100
102
  it "installs certs on PE 3 solaris" do
101
- sol = {"platform" => 'solaris-11-64', 'distmoduledir' => '/dne','hieraconf' => '/dne'}
103
+ sol = {"pe_ver" => "3.8.3", "platform" => 'solaris-11-64', 'distmoduledir' => '/dne','hieraconf' => '/dne'}
102
104
  hosts = [ sol ]
103
105
  ENV["PUPPET_INSTALL_TYPE"] = "pe"
104
106
  ENV["PUPPET_INSTALL_VERSION"] = "3.8.1"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-puppet_install_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppetlabs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-10 00:00:00.000000000 Z
11
+ date: 2016-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec