beaker 1.6.1 → 1.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/beaker/dsl/helpers.rb +7 -0
- data/lib/beaker/version.rb +1 -1
- data/spec/beaker/dsl/helpers_spec.rb +18 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Y2IxZWQ2ODlhMWE0MTg5MGE5OWZiOGU2YWNjZjRhM2MxMThkMGFkZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZGY4NWZkMzc0ZGI5MmQwODNiMmI1ZGNmY2Y0ZTNhOGFhNWY3YTA4YQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OWZhY2Q3ZTExMzI1OTI5NmRjYzVhOGNiNWI5YzhhYjEyNzFlYjM4YTJhMmI5
|
10
|
+
YTAzZWM2YWVkNDU1N2EwNjIyZGNjODk1NjZjODI5OTkwMzI3ZDExY2RkMTAy
|
11
|
+
ZjU5NDA3NzA1YWZhN2Y2YTI2YjJiZThkMzNhODA2ZDcxYWVlYTg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZWJiYzg2MGY5MWU1OTVmMzUxYTNkYzVkODJjNTBkOWYzMzgxMTkzMTFkODll
|
14
|
+
YzY2ZDBmNjhlZTMzMWY3ZGFhYWU1ODQ4NWUwMGE2MzIzMWJlODg5OTBlODZj
|
15
|
+
OTk3YzM1ZWZkMmRjNTg0NjMzMmExYjMwNzM1YTJmY2U1OTk2YjI=
|
data/lib/beaker/dsl/helpers.rb
CHANGED
@@ -674,6 +674,13 @@ module Beaker
|
|
674
674
|
# validation, etc.
|
675
675
|
#
|
676
676
|
def apply_manifest_on(host, manifest, opts = {}, &block)
|
677
|
+
if host.is_a?(Array)
|
678
|
+
host.each do |h|
|
679
|
+
apply_manifest_on(h, manifest, opts, &block)
|
680
|
+
end
|
681
|
+
return
|
682
|
+
end
|
683
|
+
|
677
684
|
on_options = {}
|
678
685
|
on_options[:acceptable_exit_codes] = Array(opts.delete(:acceptable_exit_codes))
|
679
686
|
args = ["--verbose"]
|
data/lib/beaker/version.rb
CHANGED
@@ -309,6 +309,24 @@ describe ClassMixedWithDSLHelpers do
|
|
309
309
|
|
310
310
|
subject.apply_manifest_on( agent, 'class { "boo": }')
|
311
311
|
end
|
312
|
+
|
313
|
+
it 'accepts an array of hosts' do
|
314
|
+
the_hosts = [master, agent]
|
315
|
+
|
316
|
+
subject.should_receive( :create_remote_file ).twice.and_return( true )
|
317
|
+
the_hosts.each do |host|
|
318
|
+
subject.should_receive( :puppet ).
|
319
|
+
with( 'apply', '--verbose', host.to_s ).
|
320
|
+
and_return( 'puppet_command' )
|
321
|
+
|
322
|
+
subject.should_receive( :on ).
|
323
|
+
with( host, 'puppet_command',
|
324
|
+
:acceptable_exit_codes => [0] ).ordered
|
325
|
+
end
|
326
|
+
|
327
|
+
subject.apply_manifest_on( the_hosts, 'include foobar')
|
328
|
+
end
|
329
|
+
|
312
330
|
it 'adds acceptable exit codes with :catch_failures' do
|
313
331
|
subject.should_receive( :create_remote_file ).and_return( true )
|
314
332
|
subject.should_receive( :puppet ).
|