beaker 2.6.0 → 2.7.0
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/CONTRIBUTING.md +7 -9
- data/Gemfile +1 -1
- data/README.md +1 -1
- data/lib/beaker/answers.rb +1 -1
- data/lib/beaker/answers/version38.rb +26 -0
- data/lib/beaker/answers/version40.rb +2 -2
- data/lib/beaker/host/windows.rb +4 -2
- data/lib/beaker/host_prebuilt_steps.rb +6 -11
- data/lib/beaker/options/presets.rb +2 -0
- data/lib/beaker/version.rb +1 -1
- data/spec/beaker/answers_spec.rb +39 -0
- data/spec/beaker/host_prebuilt_steps_spec.rb +0 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YzZhNGFhMzQyMzkyNjUwODVjNmQ1NmZiNGRmNGRkMTZhZjEyOGE5NA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NGQ0ZDIwOTRiNDBkMGE2ZDI3OWMyM2FlMmY0MGMxNGQzYjVjMWZjZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTE4NjJjYjY4YTYyNDJkYmU4MzFjNTgzNGM3ODZlZTJmMjMxNjEyNzkyNzBi
|
10
|
+
YzU3ZjQ5YTU3NTA2NTg1Mjc5ZDM4OTNiMWNkZDcwY2JkODJlMmI1NGI5MmU2
|
11
|
+
YmVhNGVlNDgzYzRiOWVlNDY0OTIyOWQ1ODcxYmI3YjBkYmM2ZTg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OTc4YzgyZDNhMjA5MDkxM2ZhOTdkNTA0MmRiMjJlZWI2NzY1YjAxMDE2ZmQz
|
14
|
+
YjkyODY3ZDQxZGMwZDg2ZDllYjBlODM0ZTQ2ZTUxMjNlMWE4NzUyYTg0ZWRh
|
15
|
+
ZWQ3NmViZmNjNDg4N2Y2MWMxNzQ2MmM5YjQ5MTEyODcyZjJlNjI=
|
data/CONTRIBUTING.md
CHANGED
@@ -8,8 +8,7 @@
|
|
8
8
|
* Clearly describe the issue including steps to reproduce when it is a bug.
|
9
9
|
* File in the appropriate location:
|
10
10
|
* Using your [Jira account](http://tickets.puppetlabs.com)
|
11
|
-
* Beaker bugs are submitted in the
|
12
|
-
* As a [GitHub issue](https://github.com/puppetlabs/beaker/issues?direction=desc&sort=updated&state=open)
|
11
|
+
* Beaker bugs are submitted in the [BKR project](https://tickets.puppetlabs.com/issues/?jql=project%20%3D%20BKR)
|
13
12
|
* Fork the [Beaker repository on GitHub](https://github.com/puppetlabs/beaker)
|
14
13
|
|
15
14
|
## Making Changes
|
@@ -19,10 +18,10 @@
|
|
19
18
|
* To quickly create a topic branch based on master use `git checkout -b my_contribution master`. Please avoid working directly on the `master` branch.
|
20
19
|
* Make commits of logical units.
|
21
20
|
* Check for unnecessary whitespace with `git diff --check` before committing.
|
22
|
-
* Make sure your commit messages are in the proper format.
|
21
|
+
* Make sure your commit messages are in the proper format.
|
23
22
|
|
24
23
|
````
|
25
|
-
(
|
24
|
+
(BKR-1234) Make the example in CONTRIBUTING imperative and concrete
|
26
25
|
|
27
26
|
Without this patch applied the example commit message in the CONTRIBUTING
|
28
27
|
document is not a concrete example. This is a problem because the
|
@@ -39,7 +38,7 @@
|
|
39
38
|
* Beaker uses RSpec 3.1.0+, and you should **NOT USE** deprecated `should`/`stub` methods - **USE** `expect`/`allow`. Use of deprecated RSpec methods will result in your patch being rejected. See a nice blog post from 2013 on [RSpec's new message expectation syntax](http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/).
|
40
39
|
* Make sure that you have added documentation using [Yard](http://yardoc.org/), new methods/classes without apporpriate documentation will be rejected.
|
41
40
|
* Run the tests to assure nothing else was accidentally broken, using `rake test`
|
42
|
-
* **Bonus**: if possible ensure that `rake test` runs without failures for additional Ruby versions (1.9,
|
41
|
+
* **Bonus**: if possible ensure that `rake test` runs without failures for additional Ruby versions (1.9, 2.0, etc). Beaker supports Ruby 1.9+, and breakage of support for older/newer rubies will cause a patch to be rejected.
|
43
42
|
* During the time that you are working on your patch the master Beaker branch may have changed - you'll want to [rebase](http://git-scm.com/book/en/Git-Branching-Rebasing) before you submit your PR with `git rebase master`. A successful rebase ensures that your patch will cleanly merge into Beaker.
|
44
43
|
* Submitted patches will be smoke tested through a series of acceptance level tests that ensures basic Beaker functionality - the results of these tests will be evaluated by a Beaker team member. Failures associated with the submitted patch will result in the patch being rejected.
|
45
44
|
|
@@ -47,7 +46,7 @@
|
|
47
46
|
|
48
47
|
### Maintenance
|
49
48
|
|
50
|
-
For changes of a trivial nature, it is not always necessary to create a new ticket in Jira
|
49
|
+
For changes of a trivial nature, it is not always necessary to create a new ticket in Jira. In this case, it is appropriate to start the first line of a commit with `(MAINT)` instead of a ticket/issue number.
|
51
50
|
|
52
51
|
````
|
53
52
|
(MAINT) Fix whitespace
|
@@ -74,16 +73,15 @@ To prepare for a new gem release of Beaker (after the version has been bumped) t
|
|
74
73
|
* Push your changes to a topic branch in your fork of the repository.
|
75
74
|
* Submit a pull request to [Beaker](https://github.com/puppetlabs/beaker)
|
76
75
|
* Update your ticket
|
77
|
-
* Update your [Jira](
|
76
|
+
* Update your [Jira](https://tickets.puppetlabs.com/issues/?jql=project%20%3D%20BKR) ticket to mark that you have submitted code and are ready for it to be considered for merge (Status: Ready for Merge).
|
78
77
|
* Include a link to the pull request in the ticket.
|
79
|
-
* Update your [GitHub issue](https://github.com/puppetlabs/beaker/issues?direction=desc&sort=updated&state=open)
|
80
|
-
* Include a link to the pull request in the issue.
|
81
78
|
* PRs are reviewed as time permits.
|
82
79
|
|
83
80
|
# Additional Resources
|
84
81
|
|
85
82
|
* [More information on contributing](http://links.puppetlabs.com/contribute-to-puppet)
|
86
83
|
* [Bug tracker (Jira)](http://tickets.puppetlabs.com)
|
84
|
+
* [BKR Jira Project](https://tickets.puppetlabs.com/issues/?jql=project%20%3D%20BKR)
|
87
85
|
* [Contributor License Agreement](http://links.puppetlabs.com/cla)
|
88
86
|
* [General GitHub documentation](http://help.github.com/)
|
89
87
|
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -21,5 +21,5 @@ See [LICENSE](LICENSE) file.
|
|
21
21
|
|
22
22
|
#Support
|
23
23
|
|
24
|
-
Please log tickets and issues at our [Beaker Issue Tracker](https://
|
24
|
+
Please log tickets and issues at our [Beaker Issue Tracker](https://tickets.puppetlabs.com/issues/?jql=project%20%3D%20BKR). In addition there is an active #puppet-dev channel on Freenode.
|
25
25
|
|
data/lib/beaker/answers.rb
CHANGED
@@ -20,7 +20,7 @@ module Beaker
|
|
20
20
|
when /\A3\.99/
|
21
21
|
return Version40.new(version, hosts, options)
|
22
22
|
when /\A3\.8/
|
23
|
-
return
|
23
|
+
return Version38.new(version, hosts, options)
|
24
24
|
when /\A3\.7/
|
25
25
|
return Version34.new(version, hosts, options)
|
26
26
|
when /\A3\.4/
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'beaker/answers/version34'
|
2
|
+
|
3
|
+
module Beaker
|
4
|
+
# This class provides answer file information for PE version 4.0
|
5
|
+
#
|
6
|
+
# @api private
|
7
|
+
class Version38 < Version34
|
8
|
+
def generate_answers
|
9
|
+
masterless = @options[:masterless]
|
10
|
+
return super if masterless
|
11
|
+
|
12
|
+
the_answers = super
|
13
|
+
|
14
|
+
# add new answers
|
15
|
+
exit_for_nc_migrate = answer_for(@options, :q_exit_for_nc_migrate, 'n')
|
16
|
+
enable_future_parser = answer_for(@options, :q_enable_future_parser, 'n')
|
17
|
+
|
18
|
+
the_answers.map do |key, value|
|
19
|
+
the_answers[key][:q_exit_for_nc_migrate] = exit_for_nc_migrate
|
20
|
+
the_answers[key][:q_enable_future_parser] = enable_future_parser
|
21
|
+
end
|
22
|
+
|
23
|
+
return the_answers
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -1,10 +1,10 @@
|
|
1
|
-
require 'beaker/answers/
|
1
|
+
require 'beaker/answers/version38'
|
2
2
|
|
3
3
|
module Beaker
|
4
4
|
# This class provides answer file information for PE version 4.0
|
5
5
|
#
|
6
6
|
# @api private
|
7
|
-
class Version40 <
|
7
|
+
class Version40 < Version38
|
8
8
|
def generate_answers
|
9
9
|
masterless = @options[:masterless]
|
10
10
|
return super if masterless
|
data/lib/beaker/host/windows.rb
CHANGED
@@ -29,6 +29,7 @@ module Windows
|
|
29
29
|
'sitemoduledir' => 'C:/usr/share/puppet/modules',
|
30
30
|
#let's just add both potential bin dirs to the path
|
31
31
|
'puppetbindir' => '/cygdrive/c/Program Files (x86)/Puppet Labs/Puppet Enterprise/bin:/cygdrive/c/Program Files/Puppet Labs/Puppet Enterprise/bin',
|
32
|
+
'privatebindir' => '/cygdrive/c/Program Files (x86)/Puppet Labs/Puppet Enterprise/sys/ruby/bin:/cygdrive/c/Program Files/Puppet Labs/Puppet Enterprise/sys/ruby/bin',
|
32
33
|
'pathseparator' => ';',
|
33
34
|
})
|
34
35
|
end
|
@@ -47,8 +48,9 @@ module Windows
|
|
47
48
|
'sitemoduledir' => 'C:/usr/share/puppet/modules',
|
48
49
|
'hieralibdir' => '`cygpath -w /opt/puppet-git-repos/hiera/lib`',
|
49
50
|
'hierapuppetlibdir' => '`cygpath -w /opt/puppet-git-repos/hiera-puppet/lib`',
|
50
|
-
#let's just add both potential bin dirs to the path
|
51
|
-
'puppetbindir' => '/cygdrive/c/Program Files (x86)/Puppet Labs/Puppet/bin:/cygdrive/c/Program Files/Puppet Labs/Puppet/bin
|
51
|
+
#let's just add both potential bin dirs to the path
|
52
|
+
'puppetbindir' => '/cygdrive/c/Program Files (x86)/Puppet Labs/Puppet/bin:/cygdrive/c/Program Files/Puppet Labs/Puppet/bin',
|
53
|
+
'privatebindir' => '/usr/bin',
|
52
54
|
'hierabindir' => '/opt/puppet-git-repos/hiera/bin',
|
53
55
|
'pathseparator' => ';',
|
54
56
|
})
|
@@ -453,7 +453,7 @@ module Beaker
|
|
453
453
|
def construct_env host, opts
|
454
454
|
env = additive_hash_merge(host[:host_env], opts[:host_env])
|
455
455
|
|
456
|
-
#Add PATH
|
456
|
+
#Add PATH
|
457
457
|
|
458
458
|
#prepend any PATH already set for this host
|
459
459
|
|
@@ -464,16 +464,12 @@ module Beaker
|
|
464
464
|
#run the paths through echo to see if they have any subcommands that need processing
|
465
465
|
env['PATH'].map! { |val| echo_on_host(host, val) }
|
466
466
|
|
467
|
-
#prepend any RUBYLIB already set for this host
|
468
|
-
env['RUBYLIB'] = (%w(hieralibdir hierapuppetlibdir pluginlibpath puppetlibdir facterlibdir) << env['RUBYLIB']).compact.reject(&:empty?)
|
469
|
-
#get the RUBYLIB defaults
|
470
|
-
env['RUBYLIB'].map! { |val| host[val] }
|
471
|
-
env['RUBYLIB'] = env['RUBYLIB'].compact.reject(&:empty?)
|
472
|
-
#run the paths through echo to see if they have any subcommands that need processing
|
473
|
-
env['RUBYLIB'].map! { |val| echo_on_host(host, val) }
|
474
|
-
|
475
467
|
env.each_key do |key|
|
476
|
-
|
468
|
+
separator = host['pathseparator']
|
469
|
+
if key == 'PATH' && host.is_cygwin?
|
470
|
+
separator = ':'
|
471
|
+
end
|
472
|
+
env[key] = env[key].join(separator)
|
477
473
|
end
|
478
474
|
env
|
479
475
|
end
|
@@ -525,7 +521,6 @@ module Beaker
|
|
525
521
|
host.exec(Command.new("chmod 0600 #{Pathname.new(host[:ssh_env_file]).dirname}"))
|
526
522
|
host.exec(Command.new("touch #{host[:ssh_env_file]}"))
|
527
523
|
#add the constructed env vars to this host
|
528
|
-
host.add_env_var('RUBYLIB', '$RUBYLIB')
|
529
524
|
host.add_env_var('PATH', '$PATH')
|
530
525
|
end
|
531
526
|
#add the env var set to this test host
|
@@ -190,6 +190,8 @@ module Beaker
|
|
190
190
|
:q_rbac_database_name => 'pe-rbac',
|
191
191
|
:q_rbac_database_password => '~!@#$%^*-/ aZ',
|
192
192
|
:q_install_update_server => 'y',
|
193
|
+
:q_exit_for_nc_migrate => 'n',
|
194
|
+
:q_enable_future_parser => 'n',
|
193
195
|
},
|
194
196
|
:dot_fog => File.join(ENV['HOME'], '.fog'),
|
195
197
|
:ec2_yaml => 'config/image_templates/ec2.yaml',
|
data/lib/beaker/version.rb
CHANGED
data/spec/beaker/answers_spec.rb
CHANGED
@@ -19,6 +19,11 @@ module Beaker
|
|
19
19
|
expect( answers ).to be_a_kind_of Version40
|
20
20
|
end
|
21
21
|
|
22
|
+
it 'generates 3.8 answers for 3.8 hosts' do
|
23
|
+
@ver = '3.8'
|
24
|
+
expect( answers ).to be_a_kind_of Version38
|
25
|
+
end
|
26
|
+
|
22
27
|
it 'generates 3.4 answers for 3.4 hosts' do
|
23
28
|
@ver = '3.4'
|
24
29
|
expect( answers ).to be_a_kind_of Version34
|
@@ -163,6 +168,40 @@ module Beaker
|
|
163
168
|
|
164
169
|
end
|
165
170
|
|
171
|
+
describe Version38 do
|
172
|
+
let( :options ) { Beaker::Options::Presets.new.presets }
|
173
|
+
let( :basic_hosts ) { make_hosts( {'pe_ver' => @ver } ) }
|
174
|
+
let( :hosts ) { basic_hosts[0]['roles'] = ['master', 'agent']
|
175
|
+
basic_hosts[1]['roles'] = ['dashboard', 'agent']
|
176
|
+
basic_hosts[2]['roles'] = ['database', 'agent']
|
177
|
+
basic_hosts }
|
178
|
+
let( :answers ) { Beaker::Answers.create(@ver, hosts, options) }
|
179
|
+
let( :upgrade_answers ) { Beaker::Answers.create(@ver, hosts, options.merge( {:type => :upgrade}) ) }
|
180
|
+
|
181
|
+
before :each do
|
182
|
+
@ver = '3.8'
|
183
|
+
@answers = answers.answers
|
184
|
+
end
|
185
|
+
|
186
|
+
it 'adds :q_enable_future_parser to all hosts, default to "n"' do
|
187
|
+
hosts.each do |host|
|
188
|
+
expect( host[:answers][:q_enable_future_parser] ).to be == 'n'
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
it 'adds :q_exit_for_nc_migrate to all hosts, default to "n"' do
|
193
|
+
hosts.each do |host|
|
194
|
+
expect( host[:answers][:q_exit_for_nc_migrate] ).to be == 'n'
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
it 'should add answers to the host objects' do
|
199
|
+
hosts.each do |host|
|
200
|
+
expect( host[:answers] ).to be === @answers[host.name]
|
201
|
+
end
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
166
205
|
describe Version40 do
|
167
206
|
let( :options ) { Beaker::Options::Presets.new.presets }
|
168
207
|
let( :basic_hosts ) { make_hosts( {'pe_ver' => @ver } ) }
|
@@ -514,7 +514,6 @@ describe Beaker do
|
|
514
514
|
expect( Beaker::Command ).to receive( :new ).with( "chmod 0600 #{Pathname.new(host[:ssh_env_file]).dirname}" ).once
|
515
515
|
expect( Beaker::Command ).to receive( :new ).with( "touch #{host[:ssh_env_file]}" ).once
|
516
516
|
expect( Beaker::Command ).to receive( :new ).with( "cat #{host[:ssh_env_file]}" ).once
|
517
|
-
expect( host ).to receive( :add_env_var ).with( 'RUBYLIB', '$RUBYLIB' ).once
|
518
517
|
expect( host ).to receive( :add_env_var ).with( 'PATH', '$PATH' ).once
|
519
518
|
opts.each_pair do |key, value|
|
520
519
|
expect( host ).to receive( :add_env_var ).with( key, value ).once
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppetlabs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -405,6 +405,7 @@ files:
|
|
405
405
|
- lib/beaker/answers/version30.rb
|
406
406
|
- lib/beaker/answers/version32.rb
|
407
407
|
- lib/beaker/answers/version34.rb
|
408
|
+
- lib/beaker/answers/version38.rb
|
408
409
|
- lib/beaker/answers/version40.rb
|
409
410
|
- lib/beaker/cli.rb
|
410
411
|
- lib/beaker/command.rb
|