beaker 2.41.0 → 2.42.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MjU1MDAxYzhiZDg1YzJjZGUwMzJlYjJiM2Y4N2Y1NzY4MjFlNmFjYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDA4MzRkYjEyYWM4YmFlNDE0ZjhlNWUxZTE2YWQ4ODMxZGIxNWIzZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YWRlM2Q5ZjRkZmI0YTNmYTFlMTlhMDJhNmMzNTQxOWMwYWI0ODQ0OTZiN2M0
|
10
|
+
MzY4NGNhNDYxNWM0YjQ5MDcxYWQ4ZjI3MzU3YmRiNWI1ZTk5ODJiOTIxZjUw
|
11
|
+
NzBhODljYzBhOWRhZWRjNTZmOTJiMjVkYjdmMDMwYTNjZTg5M2Y=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzEyMDM5M2VlNDZlMjI2NDVjMWZhN2NkMWIwMDI0ZjljNGI5MjQ3OGZhZGMz
|
14
|
+
OGVlOGYyMjM4YWMzODBmMjc5ZjViNDNmZTk4MDg5NWQyNmIzMmE3NmIzNGQz
|
15
|
+
ZGEyZWQ1NmQxY2QzNDRmMzA2Yzc3YzAwYWNjNDBlMDU2MTg3ZWU=
|
data/HISTORY.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# default - History
|
2
2
|
## Tags
|
3
|
-
* [LATEST -
|
3
|
+
* [LATEST - 23 May, 2016 (67b70d4a)](#LATEST)
|
4
|
+
* [2.41.0 - 10 May, 2016 (17c745bd)](#2.41.0)
|
4
5
|
* [2.40.0 - 18 Apr, 2016 (0a7b948a)](#2.40.0)
|
5
6
|
* [2.39.0 - 6 Apr, 2016 (5976e103)](#2.39.0)
|
6
7
|
* [2.38.1 - 31 Mar, 2016 (124b91b8)](#2.38.1)
|
@@ -117,7 +118,46 @@
|
|
117
118
|
* [pe1.2 - 6 Sep, 2011 (ba3dadd2)](#pe1.2)
|
118
119
|
|
119
120
|
## Details
|
120
|
-
### <a name = "LATEST">LATEST -
|
121
|
+
### <a name = "LATEST">LATEST - 23 May, 2016 (67b70d4a)
|
122
|
+
|
123
|
+
* (GEM) update beaker version to 2.42.0 (67b70d4a)
|
124
|
+
|
125
|
+
* Merge pull request #1120 from tvpartytonight/fix_assertion_method (f6bf5a19)
|
126
|
+
|
127
|
+
|
128
|
+
```
|
129
|
+
Merge pull request #1120 from tvpartytonight/fix_assertion_method
|
130
|
+
|
131
|
+
(maint) Change spec test to use simplest assertion
|
132
|
+
```
|
133
|
+
* (maint) Change spec test to use simplest assertion (abd47084)
|
134
|
+
|
135
|
+
|
136
|
+
```
|
137
|
+
(maint) Change spec test to use simplest assertion
|
138
|
+
|
139
|
+
Changes to minitest 5.9 broke a single test that used assert_equal to
|
140
|
+
generate a minitest assertion; this change uses the simplest assertion
|
141
|
+
possible, so changes to minitest are less likely to break a spec test.
|
142
|
+
```
|
143
|
+
* Merge pull request #1117 from pinkypie/BKR-688 (5eb17550)
|
144
|
+
|
145
|
+
|
146
|
+
```
|
147
|
+
Merge pull request #1117 from pinkypie/BKR-688
|
148
|
+
|
149
|
+
(BKR-688) Moving confine message(s) up a level
|
150
|
+
```
|
151
|
+
* (BKR-688) Moving message stating that criteria match has been unsuccessful in finding a matching host, to the specific case logic. (fb597511)
|
152
|
+
|
153
|
+
|
154
|
+
```
|
155
|
+
(BKR-688) Moving message stating that criteria match has been unsuccessful in finding a matching host, to the specific case logic.
|
156
|
+
This means that we can be more detailed in what exactly has failed to be found.
|
157
|
+
```
|
158
|
+
### <a name = "2.41.0">2.41.0 - 10 May, 2016 (17c745bd)
|
159
|
+
|
160
|
+
* (HISTORY) update beaker history for gem release 2.41.0 (17c745bd)
|
121
161
|
|
122
162
|
* (GEM) update beaker version to 2.41.0 (859e8702)
|
123
163
|
|
@@ -26,7 +26,7 @@ test_name "DSL::Structure::PlatformTagConfiner" do
|
|
26
26
|
begin
|
27
27
|
tag( 'tag1' )
|
28
28
|
rescue Beaker::DSL::Outcomes::SkipTest => e
|
29
|
-
if e.message =~ /^No\ suitable\ hosts\ found
|
29
|
+
if e.message =~ /^No\ suitable\ hosts\ found/
|
30
30
|
# SkipTest is raised in the case when there are no hosts leftover for a test
|
31
31
|
# after confining. It's a very common acceptance test case where all of the
|
32
32
|
# hosts involved are of the same platform, and are thus all confined
|
@@ -76,4 +76,27 @@ test_name "dsl::structure" do
|
|
76
76
|
assert_equal hosts.dup, hosts, "#confine_block did not preserve the hosts array"
|
77
77
|
end
|
78
78
|
end
|
79
|
+
|
80
|
+
step "#confine reports correct message and skips test when criteria doesn't match on 'to'" do
|
81
|
+
begin
|
82
|
+
confine :to, { :platform => 'test' }
|
83
|
+
|
84
|
+
fail "#confine did not skip test but should have."
|
85
|
+
|
86
|
+
rescue Beaker::DSL::Outcomes::SkipTest => e
|
87
|
+
assert_match /No suitable hosts found with {:platform=>"test"}/, e.message, "#confine raised an unexpected skip_test"
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
step "#confine reports correct message and skips test when criteria doesn't match on 'except'" do
|
92
|
+
begin
|
93
|
+
confine :except, { :platform => default['platform'] }
|
94
|
+
|
95
|
+
fail "#confine did not skip test but should have."
|
96
|
+
|
97
|
+
rescue Beaker::DSL::Outcomes::SkipTest => e
|
98
|
+
assert_match /No suitable hosts found without {:platform=>"#{default['platform']}"}/, e.message, "#confine raised an unexpected
|
99
|
+
# skip_test"
|
100
|
+
end
|
101
|
+
end
|
79
102
|
end
|
data/lib/beaker/dsl/structure.rb
CHANGED
@@ -200,19 +200,23 @@ module Beaker
|
|
200
200
|
# confining to all hosts *except* provided array of hosts
|
201
201
|
hosts_to_modify = hosts_not_modified
|
202
202
|
end
|
203
|
+
if hosts_to_modify.empty?
|
204
|
+
logger.warn "No suitable hosts without: #{criteria.inspect}"
|
205
|
+
skip_test "No suitable hosts found without #{criteria.inspect}"
|
206
|
+
end
|
203
207
|
when :to
|
204
208
|
if criteria and ( not criteria.empty? )
|
205
209
|
hosts_to_modify = select_hosts(criteria, hosts_to_modify, &block) + hosts_not_modified
|
206
210
|
else
|
207
211
|
# confining to only hosts in provided array of hosts
|
208
212
|
end
|
213
|
+
if hosts_to_modify.empty?
|
214
|
+
logger.warn "No suitable hosts with: #{criteria.inspect}"
|
215
|
+
skip_test "No suitable hosts found with #{criteria.inspect}"
|
216
|
+
end
|
209
217
|
else
|
210
218
|
raise "Unknown option #{type}"
|
211
219
|
end
|
212
|
-
if hosts_to_modify.empty?
|
213
|
-
logger.warn "No suitable hosts with: #{criteria.inspect}"
|
214
|
-
skip_test 'No suitable hosts found'
|
215
|
-
end
|
216
220
|
self.hosts = hosts_to_modify
|
217
221
|
hosts_to_modify
|
218
222
|
end
|
data/lib/beaker/version.rb
CHANGED
@@ -94,7 +94,9 @@ describe ClassMixedWithDSLStructure do
|
|
94
94
|
it 'passes when a MiniTest assertion is raised' do
|
95
95
|
expect( subject ).to receive( :logger ).and_return( logger )
|
96
96
|
expect( logger ).to receive( :notify )
|
97
|
-
|
97
|
+
# We changed this lambda to use the simplest assert possible; using assert_equal
|
98
|
+
# caused an error in minitest 5.9.0 trying to write to the file system.
|
99
|
+
block = lambda { assert(false, 'this assertion should be caught') }
|
98
100
|
expect{ subject.expect_failure 'this is an expected failure', &block }.to_not raise_error
|
99
101
|
end
|
100
102
|
|
@@ -122,16 +124,22 @@ describe ClassMixedWithDSLStructure do
|
|
122
124
|
allow( subject ).to receive( :logger ).and_return( logger )
|
123
125
|
end
|
124
126
|
|
125
|
-
it 'skips the test if there are no applicable hosts' do
|
127
|
+
it ':to - skips the test if there are no applicable hosts' do
|
126
128
|
allow( subject ).to receive( :hosts ).and_return( [] )
|
127
129
|
allow( subject ).to receive( :hosts= )
|
128
130
|
expect( logger ).to receive( :warn )
|
129
|
-
expect( subject ).to receive( :skip_test ).
|
130
|
-
with( 'No suitable hosts found' )
|
131
|
-
|
131
|
+
expect( subject ).to receive( :skip_test ).with( 'No suitable hosts found with {}' )
|
132
132
|
subject.confine( :to, {} )
|
133
133
|
end
|
134
134
|
|
135
|
+
it ':except - skips the test if there are no applicable hosts' do
|
136
|
+
allow( subject ).to receive( :hosts ).and_return( [] )
|
137
|
+
allow( subject ).to receive( :hosts= )
|
138
|
+
expect( logger ).to receive( :warn )
|
139
|
+
expect( subject ).to receive( :skip_test ).with( 'No suitable hosts found without {}' )
|
140
|
+
subject.confine( :except, {} )
|
141
|
+
end
|
142
|
+
|
135
143
|
it ':to - uses a provided host subset when no criteria is provided' do
|
136
144
|
subset = ['host1', 'host2']
|
137
145
|
hosts = subset.dup << 'host3'
|
@@ -485,4 +493,4 @@ describe Beaker::DSL::Structure::PlatformTagConfiner do
|
|
485
493
|
end
|
486
494
|
end
|
487
495
|
end
|
488
|
-
end
|
496
|
+
end
|
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.42.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppetlabs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|