beaker-pe 1.40.3 → 1.40.4

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: a7fe2c33219257dfd7ad0d16dd9aa44779c34519
4
- data.tar.gz: 7fb02916d2a3f6f87e2365a199b5c69446b2154f
3
+ metadata.gz: 597fd875ea2da5aa9b624818fa7f10552cb66c64
4
+ data.tar.gz: 257d558b7feb908390579bf637617469d869e51c
5
5
  SHA512:
6
- metadata.gz: 7110d726b7573e6a30b2a6b34fb7d7e557b1349d6a802c5af5efc5c392a5720fbae7cb0d8299fbbd9778de0fe1a2cef73b2abe57342ff7382e71e925d151cc91
7
- data.tar.gz: 6b5c8b6725c47c887a21bd7c03d179b5f61aae5e6d23c783fd738afbd5decae3980d342f3f22c8d03a2ce01487fb201964da369a2cb3855e4389a820297e7cb0
6
+ metadata.gz: 10e1956290fc14deb5cef437b07d978ea6ec9eefa11171eacc8906225ac0ca98e41195f5837f3e02f87cc104c0df9c992592f141a9413efbee5bb4f403e0343b
7
+ data.tar.gz: ea0f3e48e2c20209a0dbafc70ce7d9ca05bb5572cc2a433e00f715729e92c4c263c80d11cec0000f6f27fcfff18605164138048c6aabef8578dab471f5d670cd
@@ -1675,6 +1675,20 @@ module Beaker
1675
1675
  end
1676
1676
  end
1677
1677
 
1678
+ # Sync pe.conf from the master to another infrastructure node.
1679
+ # Useful when updating pe.conf to reconfigure infrastructure, where
1680
+ # you first update_pe_conf then sync_pe_conf to infrastructure hosts.
1681
+ #
1682
+ # @param [Host] host The host to sync to
1683
+ # @param pe_conf_file [String] The file to sync
1684
+ # (/etc/puppetlabs/enterprise/conf.d/pe.conf by default)
1685
+ def sync_pe_conf(host, pe_conf_file = PE_CONF_FILE)
1686
+ Dir.mktmpdir('sync_pe_conf') do |tmpdir|
1687
+ scp_from(master, pe_conf_file, tmpdir)
1688
+ scp_to(host, File.join(tmpdir, File.basename(pe_conf_file)), pe_conf_file)
1689
+ end
1690
+ end
1691
+
1678
1692
  # If the key is unquoted and does not contain pathing ('.'),
1679
1693
  # quote to ensure that puppet namespaces are protected
1680
1694
  #
@@ -3,7 +3,7 @@ module Beaker
3
3
  module PE
4
4
 
5
5
  module Version
6
- STRING = '1.40.3'
6
+ STRING = '1.40.4'
7
7
  end
8
8
 
9
9
  end
@@ -2513,6 +2513,20 @@ describe ClassMixedWithDSLInstallUtils do
2513
2513
  end
2514
2514
  end
2515
2515
 
2516
+ describe 'sync_pe_conf' do
2517
+ let(:pe_conf_path) { '/etc/puppetlabs/enterprise/conf.d/pe.conf' }
2518
+
2519
+ before(:each) do
2520
+ allow( subject ).to receive( :master ).and_return( 'testmaster' )
2521
+ end
2522
+
2523
+ it "copies pe.conf from master to a host" do
2524
+ expect(subject).to receive(:scp_from).with('testmaster', pe_conf_path, %r{sync_pe_conf})
2525
+ expect(subject).to receive(:scp_to).with('host', %r{sync_pe_conf.*/pe\.conf}, pe_conf_path)
2526
+ subject.sync_pe_conf('host')
2527
+ end
2528
+ end
2529
+
2516
2530
  describe 'create_or_update_node_conf' do
2517
2531
  let(:pe_version) { '2017.1.0' }
2518
2532
  let(:master) { hosts[0] }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-pe
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.40.3
4
+ version: 1.40.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppetlabs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-06 00:00:00.000000000 Z
11
+ date: 2018-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec