beaker-pe 1.40.4 → 1.40.5

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: 597fd875ea2da5aa9b624818fa7f10552cb66c64
4
- data.tar.gz: 257d558b7feb908390579bf637617469d869e51c
3
+ metadata.gz: f3dfc737c0733b694f0e90688ad1ea579bce74a8
4
+ data.tar.gz: b3359e1711e60d6fe7244d5ae09424140fef3504
5
5
  SHA512:
6
- metadata.gz: 10e1956290fc14deb5cef437b07d978ea6ec9eefa11171eacc8906225ac0ca98e41195f5837f3e02f87cc104c0df9c992592f141a9413efbee5bb4f403e0343b
7
- data.tar.gz: ea0f3e48e2c20209a0dbafc70ce7d9ca05bb5572cc2a433e00f715729e92c4c263c80d11cec0000f6f27fcfff18605164138048c6aabef8578dab471f5d670cd
6
+ metadata.gz: 99e45b8fda8ccddf3fe6d2305041bba748c8c19ff3d679a0d00c3634ef0c5223c3d4293638441d225f5e2fcea7655db322347721d9fb8bb285230fd56534f76f
7
+ data.tar.gz: b87a2b68f1a7f89fbf0a4c425b4b5d92262c1486b8483acfe2d79377674dea52bcac1235dddf90b7e8a477431d83556ebbe761f60ee96d8557fd24e0dc35e8df
@@ -1111,8 +1111,11 @@ module Beaker
1111
1111
  # roles hub or spoke then we intend to test mco. In this case we need
1112
1112
  # to change a setting in pe.conf to allow mco to be enabled.
1113
1113
  def get_mco_setting(hosts)
1114
- if(version_is_less('2018.1', hosts[0]['pe_ver']) && (hosts.any? {|h| h['roles'].include?('hub') || h['roles'].include?('spoke')}))
1115
- return {:answers => { 'pe_install::disable_mco' => false }}
1114
+ pe_version = hosts[0]['pe_ver']
1115
+ if (!version_is_less(pe_version, '2018.1') && version_is_less(pe_version, '2018.1.999'))
1116
+ if (hosts.any? {|h| h['roles'].include?('hub') || h['roles'].include?('spoke')})
1117
+ return {:answers => { 'pe_install::disable_mco' => false }}
1118
+ end
1116
1119
  end
1117
1120
  return {}
1118
1121
  end
@@ -3,7 +3,7 @@ module Beaker
3
3
  module PE
4
4
 
5
5
  module Version
6
- STRING = '1.40.4'
6
+ STRING = '1.40.5'
7
7
  end
8
8
 
9
9
  end
@@ -1490,22 +1490,29 @@ describe ClassMixedWithDSLInstallUtils do
1490
1490
 
1491
1491
  it 'returns mco enabled with both hub and spoke and version is greater' do
1492
1492
  hosts = [master, hub, spoke]
1493
- allow(subject).to receive(:version_is_less).and_return(true)
1494
1493
  expect(subject.get_mco_setting(hosts)).to eq({:answers => {'pe_install::disable_mco' => false}})
1495
1494
  end
1496
1495
  it 'returns mco enabled with just hub and version is greater' do
1497
1496
  hosts = [master, hub]
1498
- allow(subject).to receive(:version_is_less).and_return(true)
1499
1497
  expect(subject.get_mco_setting(hosts)).to eq({:answers => {'pe_install::disable_mco' => false}})
1500
1498
  end
1501
1499
  it 'returns mco enabled with just spoke and version is greater' do
1502
1500
  hosts = [master, spoke]
1503
- allow(subject).to receive(:version_is_less).and_return(true)
1504
1501
  expect(subject.get_mco_setting(hosts)).to eq({:answers => {'pe_install::disable_mco' => false}})
1505
1502
  end
1506
- it 'does not return anything if the version is less' do
1503
+ it 'returns mco enabled for versions between 2018.1 and 2018.2' do
1504
+ master['pe_ver'] = '2018.1.1'
1505
+ hosts = [master, hub, spoke]
1506
+ expect(subject.get_mco_setting(hosts)).to eq({:answers => {'pe_install::disable_mco' => false}})
1507
+ end
1508
+ it 'does not return anything for versions >= 2018.2' do
1509
+ master['pe_ver'] = '2018.2.0'
1510
+ hosts = [master, hub, spoke]
1511
+ expect(subject.get_mco_setting(hosts)).to eq({})
1512
+ end
1513
+ it 'does not return anything for versions < 2018.1' do
1514
+ master['pe_ver'] = '2017.3.7'
1507
1515
  hosts = [master, hub, spoke]
1508
- allow(subject).to receive(:version_is_less).and_return(false)
1509
1516
  expect(subject.get_mco_setting(hosts)).to eq({})
1510
1517
  end
1511
1518
  end
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.4
4
+ version: 1.40.5
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-09 00:00:00.000000000 Z
11
+ date: 2018-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec