beaker 2.14.0 → 2.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/HISTORY.md +37 -2
- data/lib/beaker/dsl/helpers/puppet_helpers.rb +2 -0
- data/lib/beaker/dsl/install_utils/pe_defaults.rb +6 -0
- data/lib/beaker/dsl/install_utils/pe_utils.rb +0 -4
- data/lib/beaker/version.rb +1 -1
- data/spec/beaker/dsl/helpers/puppet_helpers_spec.rb +16 -2
- data/spec/beaker/dsl/install_utils/pe_defaults_spec.rb +61 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDI1NWRkYzBiZmZlOWEwMTY0NjRlNGJjYzcwMDM5MzZhNWFlNDk0Mg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OTg5MjdmOTFlZjY0NjVhZGYxNjQ3M2QwYzg5ZGQ0MzA0MTAyNjdjNQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NzUyZTA5Mzc1MjgyODA1ODg1ZjNjYThjZWY2YTg4NDgwYmM4NGQ2M2RiNTVh
|
10
|
+
NTAyYzEyZGY0ODlhY2Y5ZTRiZjVmNjJkOGRmZDE4ZjhhYTY4NTQwOTBlOGY4
|
11
|
+
MzEyMGU0OTUyZmEyZmMzYTRkYWEyYTljZGIxMjk2MWVlNDM2OWY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MWU2YmQ1N2M5OWExZjVlZmUyZTYwOWU0MDkwYTFiZTIxYmVmODBhOTI3ZWM5
|
14
|
+
M2RhN2M1ZDMwNjg5Mjc1ZDAyMWFiZDBlMDVlMTUwYWE4YTQzYTM0NDBhMmZl
|
15
|
+
YTAxNjllMjcwMGE3NjhhNDJmNDA0OWNkMGY3NzFkYTYzNDQzYjg=
|
data/HISTORY.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# default - History
|
2
2
|
## Tags
|
3
|
-
* [LATEST -
|
3
|
+
* [LATEST - 5 Jun, 2015 (8539687f)](#LATEST)
|
4
|
+
* [2.14.0 - 4 Jun, 2015 (c0ebcd16)](#2.14.0)
|
4
5
|
* [2.13.0 - 29 May, 2015 (dd70aa66)](#2.13.0)
|
5
6
|
* [2.12.0 - 20 May, 2015 (62845ce9)](#2.12.0)
|
6
7
|
* [2.11.0 - 6 May, 2015 (b775cc73)](#2.11.0)
|
@@ -82,7 +83,41 @@
|
|
82
83
|
* [pe1.2 - 6 Sep, 2011 (ba3dadd2)](#pe1.2)
|
83
84
|
|
84
85
|
## Details
|
85
|
-
### <a name = "LATEST">LATEST -
|
86
|
+
### <a name = "LATEST">LATEST - 5 Jun, 2015 (8539687f)
|
87
|
+
|
88
|
+
* (GEM) update beaker version to 2.14.1 (8539687f)
|
89
|
+
|
90
|
+
* Merge pull request #842 from anodelman/fix-puppetservice-default (28a4ef9c)
|
91
|
+
|
92
|
+
|
93
|
+
```
|
94
|
+
Merge pull request #842 from anodelman/fix-puppetservice-default
|
95
|
+
|
96
|
+
(BKR-313) Beaker is using pe-httpd as the puppet master service...
|
97
|
+
```
|
98
|
+
* Merge pull request #841 from kevpl/bkr295_ubuntu_stopagenton_fix (eb8cc39c)
|
99
|
+
|
100
|
+
|
101
|
+
```
|
102
|
+
Merge pull request #841 from kevpl/bkr295_ubuntu_stopagenton_fix
|
103
|
+
|
104
|
+
(BKR-295) use 'puppet' in stop_agent_on for 4.0+
|
105
|
+
```
|
106
|
+
* (BKR-313) Beaker is using pe-httpd as the puppet master service... (a27eb5ae)
|
107
|
+
|
108
|
+
|
109
|
+
```
|
110
|
+
(BKR-313) Beaker is using pe-httpd as the puppet master service...
|
111
|
+
|
112
|
+
... in method 'with_puppet_running_on'
|
113
|
+
|
114
|
+
- use pe-httpd pre 3.4, pe-puppetserver post 3.4
|
115
|
+
```
|
116
|
+
* (BKR-295) use 'puppet' in stop_agent_on for 4.0+ (9604315c)
|
117
|
+
|
118
|
+
### <a name = "2.14.0">2.14.0 - 4 Jun, 2015 (c0ebcd16)
|
119
|
+
|
120
|
+
* (HISTORY) update beaker history for gem release 2.14.0 (c0ebcd16)
|
86
121
|
|
87
122
|
* (GEM) update beaker version to 2.14.0 (656f30be)
|
88
123
|
|
@@ -606,6 +606,8 @@ module Beaker
|
|
606
606
|
# that if the script doesn't exist, we should just use `pe-puppet`
|
607
607
|
agent_service = 'pe-puppet-agent'
|
608
608
|
agent_service = 'pe-puppet' unless agent.file_exist?('/etc/init.d/pe-puppet-agent')
|
609
|
+
# In 4.0 this was changed to just be `puppet`
|
610
|
+
agent_service = 'puppet' unless version_is_less(agent['pe_ver'], '4.0')
|
609
611
|
|
610
612
|
# Under a number of stupid circumstances, we can't stop the
|
611
613
|
# agent using puppet. This is usually because of issues with
|
@@ -79,6 +79,12 @@ module Beaker
|
|
79
79
|
host['group'] = 'pe-puppet'
|
80
80
|
end
|
81
81
|
host['type'] = 'pe'
|
82
|
+
# newer pe requires a different puppetservice name, set it here on the master
|
83
|
+
if host['roles'].include?('master')
|
84
|
+
if host['pe_ver'] and (not version_is_less(host['pe_ver'], '3.4'))
|
85
|
+
host['puppetservice'] = 'pe-puppetserver'
|
86
|
+
end
|
87
|
+
end
|
82
88
|
end
|
83
89
|
|
84
90
|
# Add the appropriate pe defaults to an array of hosts
|
@@ -359,10 +359,6 @@ module Beaker
|
|
359
359
|
unless masterless
|
360
360
|
pre30database = version_is_less(opts[:pe_ver] || database['pe_ver'], '3.0')
|
361
361
|
pre30master = version_is_less(opts[:pe_ver] || master['pe_ver'], '3.0')
|
362
|
-
|
363
|
-
unless version_is_less(opts[:pe_ver] || master['pe_ver'], '3.4')
|
364
|
-
master['puppetservice'] = 'pe-puppetserver'
|
365
|
-
end
|
366
362
|
end
|
367
363
|
|
368
364
|
# Set PE distribution for all the hosts, create working dir
|
data/lib/beaker/version.rb
CHANGED
@@ -361,7 +361,7 @@ describe ClassMixedWithDSLHelpers do
|
|
361
361
|
|
362
362
|
it 'runs the pe-puppet on a system without pe-puppet-agent' do
|
363
363
|
vardir = '/var'
|
364
|
-
deb_agent = make_host( 'deb', :platform => 'debian-7-amd64' )
|
364
|
+
deb_agent = make_host( 'deb', :platform => 'debian-7-amd64', :pe_ver => '3.7' )
|
365
365
|
allow( deb_agent ).to receive( :puppet ).and_return( { 'vardir' => vardir } )
|
366
366
|
|
367
367
|
expect( deb_agent ).to receive( :file_exist? ).with("/var/state/agent_catalog_run.lock").and_return(false)
|
@@ -376,7 +376,7 @@ describe ClassMixedWithDSLHelpers do
|
|
376
376
|
|
377
377
|
it 'runs the pe-puppet-agent on a unix system with pe-puppet-agent' do
|
378
378
|
vardir = '/var'
|
379
|
-
el_agent = make_host( 'el', :platform => 'el-5-x86_64' )
|
379
|
+
el_agent = make_host( 'el', :platform => 'el-5-x86_64', :pe_ver => '3.7' )
|
380
380
|
allow( el_agent ).to receive( :puppet ).and_return( { 'vardir' => vardir } )
|
381
381
|
|
382
382
|
expect( el_agent ).to receive( :file_exist? ).with("/var/state/agent_catalog_run.lock").and_return(false)
|
@@ -388,6 +388,20 @@ describe ClassMixedWithDSLHelpers do
|
|
388
388
|
subject.stop_agent_on( el_agent )
|
389
389
|
end
|
390
390
|
|
391
|
+
it 'runs puppet on a unix system 4.0 or newer' do
|
392
|
+
vardir = '/var'
|
393
|
+
el_agent = make_host( 'el', :platform => 'el-5-x86_64', :pe_ver => '4.0' )
|
394
|
+
allow( el_agent ).to receive( :puppet ).and_return( { 'vardir' => vardir } )
|
395
|
+
|
396
|
+
expect( el_agent ).to receive( :file_exist? ).with("/var/state/agent_catalog_run.lock").and_return(false)
|
397
|
+
expect( el_agent ).to receive( :file_exist? ).with("/etc/init.d/pe-puppet-agent").and_return(true)
|
398
|
+
|
399
|
+
expect( subject ).to receive( :puppet_resource ).with( "service", "puppet", "ensure=stopped").once
|
400
|
+
expect( subject ).to receive( :on ).once
|
401
|
+
|
402
|
+
subject.stop_agent_on( el_agent )
|
403
|
+
end
|
404
|
+
|
391
405
|
end
|
392
406
|
|
393
407
|
describe "#stop_agent" do
|
@@ -0,0 +1,61 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
class ClassMixedWithDSLInstallUtils
|
4
|
+
include Beaker::DSL::InstallUtils
|
5
|
+
include Beaker::DSL::Wrappers
|
6
|
+
include Beaker::DSL::Helpers
|
7
|
+
include Beaker::DSL::Structure
|
8
|
+
include Beaker::DSL::Roles
|
9
|
+
include Beaker::DSL::Patterns
|
10
|
+
|
11
|
+
attr_accessor :hosts
|
12
|
+
|
13
|
+
def logger
|
14
|
+
@logger ||= RSpec::Mocks::Double.new('logger').as_null_object
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe ClassMixedWithDSLInstallUtils do
|
19
|
+
let(:presets) { Beaker::Options::Presets.new }
|
20
|
+
let(:opts) { presets.presets.merge(presets.env_vars) }
|
21
|
+
let(:basic_hosts) { make_hosts( { :pe_ver => @pe_ver || '3.0',
|
22
|
+
:platform => 'linux',
|
23
|
+
:roles => [ 'agent' ] }, 4 ) }
|
24
|
+
let(:hosts) { basic_hosts[0][:roles] = ['master', 'database', 'dashboard']
|
25
|
+
basic_hosts[1][:platform] = 'windows'
|
26
|
+
basic_hosts[2][:platform] = 'osx-10.9-x86_64'
|
27
|
+
basic_hosts[3][:platform] = 'eos'
|
28
|
+
basic_hosts }
|
29
|
+
let(:hosts_sorted) { [ hosts[1], hosts[0], hosts[2], hosts[3] ] }
|
30
|
+
let(:winhost) { make_host( 'winhost', { :platform => 'windows',
|
31
|
+
:pe_ver => '3.0',
|
32
|
+
:working_dir => '/tmp' } ) }
|
33
|
+
let(:machost) { make_host( 'machost', { :platform => 'osx-10.9-x86_64',
|
34
|
+
:pe_ver => '3.0',
|
35
|
+
:working_dir => '/tmp' } ) }
|
36
|
+
let(:unixhost) { make_host( 'unixhost', { :platform => 'linux',
|
37
|
+
:pe_ver => '3.0',
|
38
|
+
:working_dir => '/tmp',
|
39
|
+
:dist => 'puppet-enterprise-3.1.0-rc0-230-g36c9e5c-debian-7-i386' } ) }
|
40
|
+
let(:eoshost) { make_host( 'eoshost', { :platform => 'eos',
|
41
|
+
:pe_ver => '3.0',
|
42
|
+
:working_dir => '/tmp',
|
43
|
+
:dist => 'puppet-enterprise-3.7.1-rc0-78-gffc958f-eos-4-i386' } ) }
|
44
|
+
|
45
|
+
describe '#add_platform_pe_defaults' do
|
46
|
+
it 'sets puppetservice on master to be pe-httpd on pre-3.4 pe' do
|
47
|
+
@pe_ver = '3.3'
|
48
|
+
subject.add_platform_pe_defaults(hosts[0], 'unix')
|
49
|
+
expect(hosts[0]['puppetservice']).to be == 'pe-httpd'
|
50
|
+
|
51
|
+
end
|
52
|
+
|
53
|
+
it 'sets puppetservice on master to be pe-puppetserver on post-3.4 pe' do
|
54
|
+
@pe_ver = '3.7'
|
55
|
+
subject.add_platform_pe_defaults(hosts[0], 'unix')
|
56
|
+
expect(hosts[0]['puppetservice']).to be == 'pe-puppetserver'
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.14.
|
4
|
+
version: 2.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppetlabs
|
@@ -516,6 +516,7 @@ files:
|
|
516
516
|
- spec/beaker/dsl/helpers/web_helpers_spec.rb
|
517
517
|
- spec/beaker/dsl/install_utils/foss_utils_spec.rb
|
518
518
|
- spec/beaker/dsl/install_utils/module_utils_spec.rb
|
519
|
+
- spec/beaker/dsl/install_utils/pe_defaults_spec.rb
|
519
520
|
- spec/beaker/dsl/install_utils/pe_utils_spec.rb
|
520
521
|
- spec/beaker/dsl/outcomes_spec.rb
|
521
522
|
- spec/beaker/dsl/roles_spec.rb
|