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 +4 -4
- data/lib/beaker-pe/install/pe_utils.rb +5 -2
- data/lib/beaker-pe/version.rb +1 -1
- data/spec/beaker-pe/install/pe_utils_spec.rb +12 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3dfc737c0733b694f0e90688ad1ea579bce74a8
|
4
|
+
data.tar.gz: b3359e1711e60d6fe7244d5ae09424140fef3504
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
1115
|
-
|
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
|
data/lib/beaker-pe/version.rb
CHANGED
@@ -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 '
|
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
|
+
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
|
11
|
+
date: 2018-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|