beaker 2.14.1 → 2.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/HISTORY.md +286 -27
- data/beaker.gemspec +1 -0
- data/lib/beaker/answers.rb +1 -1
- data/lib/beaker/answers/version40.rb +7 -5
- data/lib/beaker/cli.rb +2 -2
- data/lib/beaker/dsl/helpers/puppet_helpers.rb +24 -2
- data/lib/beaker/dsl/helpers/web_helpers.rb +3 -1
- data/lib/beaker/dsl/install_utils/foss_defaults.rb +11 -1
- data/lib/beaker/dsl/install_utils/foss_utils.rb +358 -248
- data/lib/beaker/dsl/install_utils/module_utils.rb +1 -7
- data/lib/beaker/dsl/install_utils/pe_defaults.rb +1 -1
- data/lib/beaker/dsl/install_utils/pe_utils.rb +63 -9
- data/lib/beaker/dsl/install_utils/puppet_utils.rb +40 -0
- data/lib/beaker/dsl/structure.rb +35 -0
- data/lib/beaker/host/pswindows/exec.rb +9 -0
- data/lib/beaker/host/unix/exec.rb +10 -1
- data/lib/beaker/host/unix/pkg.rb +0 -2
- data/lib/beaker/host_prebuilt_steps.rb +2 -2
- data/lib/beaker/hypervisor/aws_sdk.rb +1 -1
- data/lib/beaker/options/command_line_parser.rb +7 -0
- data/lib/beaker/options/parser.rb +28 -8
- data/lib/beaker/options/presets.rb +4 -3
- data/lib/beaker/shared/semvar.rb +23 -2
- data/lib/beaker/test_suite.rb +2 -2
- data/lib/beaker/version.rb +1 -1
- data/spec/beaker/cli_spec.rb +35 -34
- data/spec/beaker/dsl/helpers/puppet_helpers_spec.rb +78 -7
- data/spec/beaker/dsl/install_utils/foss_utils_spec.rb +126 -17
- data/spec/beaker/dsl/install_utils/module_utils_spec.rb +2 -2
- data/spec/beaker/dsl/install_utils/pe_utils_spec.rb +106 -0
- data/spec/beaker/dsl/install_utils/puppet_utils_spec.rb +73 -0
- data/spec/beaker/dsl/structure_spec.rb +67 -0
- data/spec/beaker/host/unix/exec_spec.rb +53 -0
- data/spec/beaker/host/windows/exec_spec.rb +53 -0
- data/spec/beaker/host_prebuilt_steps_spec.rb +13 -0
- data/spec/beaker/hypervisor/aws_sdk_spec.rb +65 -0
- data/spec/beaker/options/command_line_parser_spec.rb +2 -2
- data/spec/beaker/options/parser_spec.rb +126 -1
- data/spec/beaker/shared/semvar_spec.rb +43 -0
- data/spec/beaker/test_suite_spec.rb +21 -0
- data/spec/helpers.rb +4 -0
- metadata +19 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTY1NWMyYTg5NGI2MTgzYzYyMDczZDJkMWU3ZTQwMDNhN2MyMDJhZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
M2ZmNDUxZWZlZDY2NzI1NTlhNjRhNmNkYzM1YjBmZTgzN2U0NWQzYg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODUwOThkOTM1YzQ1MjEzYjk4NmRhOTFlZGNhZjFkYWRjNDBjZmYxMjUyOTY1
|
10
|
+
YTliOGZiMzQ3MTA0ZjExYTMwOGFlOGJjMjA5YTM1OWE1M2UzZDA5MGRmODNm
|
11
|
+
ZTJiN2NjNzkxMDhmYjlkY2FkMmNjZjk1NGNjMGE5N2I3ODAzZDI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjBjOTA4NTdlYjdiNzlkMzY3ZDA4OTg5OGYyNmZlOTljMzk0ZTEzYWY1Njdh
|
14
|
+
YWYxODM4MmYwZDc0MjYxYmQ5Y2I0ZDA2YWE1ZjVkODhlOTNhMmExNTNjMjQx
|
15
|
+
OGMyOTdmMGNkZDBkNzNkMjYyYzBjOTlkMWQwYTE1YjlkZWFiNzI=
|
data/HISTORY.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# default - History
|
2
2
|
## Tags
|
3
|
-
* [LATEST -
|
3
|
+
* [LATEST - 1 Jul, 2015 (4b71df0e)](#LATEST)
|
4
|
+
* [2.14.1 - 5 Jun, 2015 (35026603)](#2.14.1)
|
4
5
|
* [2.14.0 - 4 Jun, 2015 (c0ebcd16)](#2.14.0)
|
5
6
|
* [2.13.0 - 29 May, 2015 (dd70aa66)](#2.13.0)
|
6
7
|
* [2.12.0 - 20 May, 2015 (62845ce9)](#2.12.0)
|
@@ -78,12 +79,294 @@
|
|
78
79
|
* [pe2.0.3 - 21 Feb, 2012 (492ff756)](#pe2.0.3)
|
79
80
|
* [pe2.0.2 - 3 Feb, 2012 (e36f0d22)](#pe2.0.2)
|
80
81
|
* [pe2.0.1 - 31 Jan, 2012 (3a118201)](#pe2.0.1)
|
81
|
-
* [pe2.0.0 - 31 Jan, 2012 (8d064e33)](#pe2.0.0)
|
82
82
|
* [pe2.0 - 11 Nov, 2011 (4d7b65b6)](#pe2.0)
|
83
83
|
* [pe1.2 - 6 Sep, 2011 (ba3dadd2)](#pe1.2)
|
84
84
|
|
85
85
|
## Details
|
86
|
-
### <a name = "LATEST">LATEST -
|
86
|
+
### <a name = "LATEST">LATEST - 1 Jul, 2015 (4b71df0e)
|
87
|
+
|
88
|
+
* (GEM) update beaker version to 2.15.0 (4b71df0e)
|
89
|
+
|
90
|
+
* Merge pull request #869 from kevpl/bkr253_installpe_pe_aio_url (b243648e)
|
91
|
+
|
92
|
+
|
93
|
+
```
|
94
|
+
Merge pull request #869 from kevpl/bkr253_installpe_pe_aio_url
|
95
|
+
|
96
|
+
(BKR-253) install_pe_on uses pe_promoted puppet-agent for 4.0+
|
97
|
+
```
|
98
|
+
* (BKR-253) install_pe_on uses pe_promoted puppet-agent for 4.0+ (c0d47643)
|
99
|
+
|
100
|
+
* Merge pull request #860 from anodelman/shallow (11f9a9ba)
|
101
|
+
|
102
|
+
|
103
|
+
```
|
104
|
+
Merge pull request #860 from anodelman/shallow
|
105
|
+
|
106
|
+
(BKR-323) Allow install_puppet_agent_on to support "pe only" platforms
|
107
|
+
```
|
108
|
+
* Merge pull request #862 from anodelman/support-date-version (dbc4b535)
|
109
|
+
|
110
|
+
|
111
|
+
```
|
112
|
+
Merge pull request #862 from anodelman/support-date-version
|
113
|
+
|
114
|
+
(BKR-344) Support year.release versioning (e.g. 2015.2)
|
115
|
+
```
|
116
|
+
* Merge pull request #863 from anodelman/maint (b444c507)
|
117
|
+
|
118
|
+
|
119
|
+
```
|
120
|
+
Merge pull request #863 from anodelman/maint
|
121
|
+
|
122
|
+
(MAINT) add spec testing to option parsing prioritization
|
123
|
+
```
|
124
|
+
* (BKR-352) Beaker install_puppet_agent_on helper does not... (521e4791)
|
125
|
+
|
126
|
+
|
127
|
+
```
|
128
|
+
(BKR-352) Beaker install_puppet_agent_on helper does not...
|
129
|
+
|
130
|
+
...respect the host install_32 or ruby_arch setting on Windows
|
131
|
+
|
132
|
+
- install x86 msi when
|
133
|
+
* host['install_32'] == true
|
134
|
+
* opts['install_32'] == true
|
135
|
+
* host['ruby_arch'] == 'x86'
|
136
|
+
* host.is_x86_64? == false
|
137
|
+
- install x64 msi when
|
138
|
+
* (host.is_x86_64? == true) && !host['install_32'] &&
|
139
|
+
!opts['install_32'] && !(host['ruby_arch'] == 'x86')
|
140
|
+
```
|
141
|
+
* (MAINT) add spec testing to option parsing prioritization (701c5aed)
|
142
|
+
|
143
|
+
|
144
|
+
```
|
145
|
+
(MAINT) add spec testing to option parsing prioritization
|
146
|
+
|
147
|
+
- make sure that we are sorting through env variables, command line
|
148
|
+
arguments, host file options, options file argument and presets
|
149
|
+
correctly
|
150
|
+
```
|
151
|
+
* (BKR-344) Support year.release versioning (e.g. 2015.2) (048e6708)
|
152
|
+
|
153
|
+
|
154
|
+
```
|
155
|
+
(BKR-344) Support year.release versioning (e.g. 2015.2)
|
156
|
+
|
157
|
+
- update semver matching to understand that 3.0.0 < 2015.3.0.0
|
158
|
+
- update answer file generation to provide 4.0 answers for version 2015+
|
159
|
+
```
|
160
|
+
* Merge pull request #855 from bstopp/bug/copy_module_to_mv_fix (9631b55a)
|
161
|
+
|
162
|
+
|
163
|
+
```
|
164
|
+
Merge pull request #855 from bstopp/bug/copy_module_to_mv_fix
|
165
|
+
|
166
|
+
(BKR-339) Remove the target module directory on host during copy_module_to
|
167
|
+
```
|
168
|
+
* Merge pull request #853 from kevpl/bkr319_installpe_puppetagent (6ddec170)
|
169
|
+
|
170
|
+
|
171
|
+
```
|
172
|
+
Merge pull request #853 from kevpl/bkr319_installpe_puppetagent
|
173
|
+
|
174
|
+
(BKR-319) added puppet-agent install for install_pe for versions over 4.0
|
175
|
+
```
|
176
|
+
* Merge pull request #851 from madAndroid/BKR-314-idempotent-EL-install-release-repo (d7fccf8f)
|
177
|
+
|
178
|
+
|
179
|
+
```
|
180
|
+
Merge pull request #851 from madAndroid/BKR-314-idempotent-EL-install-release-repo
|
181
|
+
|
182
|
+
(BKR-314) Ensure install_puppetlabs_release_repo is idempotent for EL
|
183
|
+
```
|
184
|
+
* (BKR-319) review feedback refactor (4b7235ec)
|
185
|
+
|
186
|
+
* (BKR-323) Allow install_puppet_agent_on to support "pe only" platforms (cc906f1d)
|
187
|
+
|
188
|
+
|
189
|
+
```
|
190
|
+
(BKR-323) Allow install_puppet_agent_on to support "pe only" platforms
|
191
|
+
|
192
|
+
- support both pm.puppetlabs.com and builds.puppetlabs.com for
|
193
|
+
downloading puppet-agent
|
194
|
+
- use install_puppet_agent_on for yum|apt.puppetlabs.com
|
195
|
+
- use install_puppet_agent_dev_repo_on for builds.puppetlabs.com
|
196
|
+
- use install_puppet_agent_pe_promoted_repo_on for pm.puppetlabs.com
|
197
|
+
|
198
|
+
example usage:
|
199
|
+
install_puppet_agent_on(host, { :version => '1.1.0', :default_action => 'gem_install'})
|
200
|
+
install_puppet_agent_dev_repo_on(host, { :sha => 'd3377feaeac173aada3a2c2cedd141eb610960a7', :version => '1.1.1.225.gd3377fe' })
|
201
|
+
install_puppet_agent_pe_promoted_repo_on(host, { :sha => '1.1.0.227', :version => '1.1.0.227.g1d8334c', :pe_ver => '4.0.0-rc1'})
|
202
|
+
```
|
203
|
+
* Merge pull request #844 from kevpl/bkr53_withpuppetrunningon_restart (36c9ae20)
|
204
|
+
|
205
|
+
|
206
|
+
```
|
207
|
+
Merge pull request #844 from kevpl/bkr53_withpuppetrunningon_restart
|
208
|
+
|
209
|
+
(BKR-53) with_puppet_running_on only restarts before yielding
|
210
|
+
```
|
211
|
+
* (BKR-339) Remove the target module directory on host during copy_module_to (1d1d7eb6)
|
212
|
+
|
213
|
+
|
214
|
+
```
|
215
|
+
(BKR-339) Remove the target module directory on host during copy_module_to
|
216
|
+
|
217
|
+
Without this patch, the copy_module_to function will not work correctly to copy updated module files into the target directory on the hosts. Instead accpetance test spec files can be updated, but not module sources. Additionally the module copy will fail on the second non-provisioning run.
|
218
|
+
|
219
|
+
The patch simply executes a delete of the target directory on the host, ensuring it does not exist prior to the mv command.
|
220
|
+
```
|
221
|
+
* Merge pull request #847 from anodelman/fail-fast (923c7857)
|
222
|
+
|
223
|
+
|
224
|
+
```
|
225
|
+
Merge pull request #847 from anodelman/fail-fast
|
226
|
+
|
227
|
+
(BKR-322) --fail-mode fast doesn't seem to be failing fast
|
228
|
+
```
|
229
|
+
* (BKR-319) added puppet-agent install for install_pe for versions over 4.0 (2749c051)
|
230
|
+
|
231
|
+
* Merge pull request #850 from anodelman/aio-paths (19511298)
|
232
|
+
|
233
|
+
|
234
|
+
```
|
235
|
+
Merge pull request #850 from anodelman/aio-paths
|
236
|
+
|
237
|
+
(BKR-325) AIO detection for install_puppet() and install_pe()
|
238
|
+
```
|
239
|
+
* Merge pull request #846 from anodelman/shallow (b00942f0)
|
240
|
+
|
241
|
+
|
242
|
+
```
|
243
|
+
Merge pull request #846 from anodelman/shallow
|
244
|
+
|
245
|
+
(BKR-317) More usable configure_foss_defaults_on
|
246
|
+
```
|
247
|
+
* Merge pull request #848 from petems/BKR-326-fix_freebsd_ssh_root_setup (3491f13d)
|
248
|
+
|
249
|
+
|
250
|
+
```
|
251
|
+
Merge pull request #848 from petems/BKR-326-fix_freebsd_ssh_root_setup
|
252
|
+
|
253
|
+
(BKR-326) Fixes enabling user environments
|
254
|
+
```
|
255
|
+
* Merge pull request #839 from vindir/feature/aws_ip_failover (837b2673)
|
256
|
+
|
257
|
+
|
258
|
+
```
|
259
|
+
Merge pull request #839 from vindir/feature/aws_ip_failover
|
260
|
+
|
261
|
+
(BKR-311) Allow AWS IP Fallback
|
262
|
+
```
|
263
|
+
* (BKR-326) Adds requirement of perl for FreeBSD (476b3860)
|
264
|
+
|
265
|
+
|
266
|
+
```
|
267
|
+
(BKR-326) Adds requirement of perl for FreeBSD
|
268
|
+
|
269
|
+
Makes regex sed replacement easier
|
270
|
+
```
|
271
|
+
* BKR-314 - expect more explicit rpm command - with --replacepkgs (cca0046e)
|
272
|
+
|
273
|
+
* BKR-314 - Use --replacepkgs to ensure repo install is idempotent (dd73ca21)
|
274
|
+
|
275
|
+
* (BKR-325) AIO detection for install_puppet() and install_pe() (8e6347ab)
|
276
|
+
|
277
|
+
|
278
|
+
```
|
279
|
+
(BKR-325) AIO detection for install_puppet() and install_pe()
|
280
|
+
|
281
|
+
- check the pe_ver/version to see if aio pathing should be installed
|
282
|
+
instead of foss/pe
|
283
|
+
```
|
284
|
+
* (BKR-326) Adds FreeBSD specs for root login enable (a8ffadbe)
|
285
|
+
|
286
|
+
* (BKR-326) Fixes enabling user environments (e5bc2451)
|
287
|
+
|
288
|
+
|
289
|
+
```
|
290
|
+
(BKR-326) Fixes enabling user environments
|
291
|
+
|
292
|
+
Currently this step uses `echo_to_file`, which actually overwrites the file with the one line. This changes it to use the perl regex instead.
|
293
|
+
```
|
294
|
+
* (BKR-322) --fail-mode fast doesn't seem to be failing fast (7dfb56e0)
|
295
|
+
|
296
|
+
|
297
|
+
```
|
298
|
+
(BKR-322) --fail-mode fast doesn't seem to be failing fast
|
299
|
+
|
300
|
+
- was using the default value instead of the setting value
|
301
|
+
```
|
302
|
+
* (BKR-317) More usable configure_foss_defaults_on (74df91d1)
|
303
|
+
|
304
|
+
|
305
|
+
```
|
306
|
+
(BKR-317) More usable configure_foss_defaults_on
|
307
|
+
|
308
|
+
- add support for remove_defaults_on
|
309
|
+
- add some spec test coverage
|
310
|
+
```
|
311
|
+
* Merge pull request #828 from kevpl/bkr220_tagging_add (5f71cdb3)
|
312
|
+
|
313
|
+
|
314
|
+
```
|
315
|
+
Merge pull request #828 from kevpl/bkr220_tagging_add
|
316
|
+
|
317
|
+
(BKR-220) test tagging implemented
|
318
|
+
```
|
319
|
+
* (BKR-317) More usable configure_foss_defaults_on (12c51454)
|
320
|
+
|
321
|
+
|
322
|
+
```
|
323
|
+
(BKR-317) More usable configure_foss_defaults_on
|
324
|
+
|
325
|
+
- create configure_defaults_on that provided a type sets the correct
|
326
|
+
defaults per-host, will also remove any existing defaults
|
327
|
+
```
|
328
|
+
* Merge pull request #845 from kevpl/bkr320_answers_40nilproblems (56fbc872)
|
329
|
+
|
330
|
+
|
331
|
+
```
|
332
|
+
Merge pull request #845 from kevpl/bkr320_answers_40nilproblems
|
333
|
+
|
334
|
+
(BKR-320) added nil-check so we don't call methods on empty answer maps
|
335
|
+
```
|
336
|
+
* (BKR-320) added nil-check so we don't call methods on empty answer maps (2d38a720)
|
337
|
+
|
338
|
+
* (BKR-53) with_puppet_running_on can not restart after yielding (9da3b99f)
|
339
|
+
|
340
|
+
|
341
|
+
```
|
342
|
+
(BKR-53) with_puppet_running_on can not restart after yielding
|
343
|
+
|
344
|
+
Before, with_puppet_running_on bounced the puppet service before and after runs.
|
345
|
+
This was causing us a lot of pain as the last restart proved unnecessary for the
|
346
|
+
most part, and added 30 seconds to each test run on avg in our CI.
|
347
|
+
|
348
|
+
We've decided to improve this by adding the ability to remove the second bounce.
|
349
|
+
Mosts tests use `with_puppet_running_on`, so they'll be setup accordingly before
|
350
|
+
yielding, so that second one is unnecessary.
|
351
|
+
```
|
352
|
+
* (BKR-311) Allow AWS IP Fallback (098daef0)
|
353
|
+
|
354
|
+
|
355
|
+
```
|
356
|
+
(BKR-311) Allow AWS IP Fallback
|
357
|
+
|
358
|
+
When bringing up an instance in a VPC there won't always be a public address.
|
359
|
+
This allows the AWS hypervisor to fallback and assign an instance's private
|
360
|
+
ip to host['ip'] for new instances without a public address.
|
361
|
+
|
362
|
+
This PR includes tests for the .AwsSdk#populate_dns method to verify this new
|
363
|
+
behavior persists in the future.
|
364
|
+
```
|
365
|
+
* (BKR-220) test tagging implemented (f41c29f9)
|
366
|
+
|
367
|
+
### <a name = "2.14.1">2.14.1 - 5 Jun, 2015 (35026603)
|
368
|
+
|
369
|
+
* (HISTORY) update beaker history for gem release 2.14.1 (35026603)
|
87
370
|
|
88
371
|
* (GEM) update beaker version to 2.14.1 (8539687f)
|
89
372
|
|
@@ -19158,30 +19441,6 @@ effect a dhcp lease renewal after ntpdate is run
|
|
19158
19441
|
|
19159
19442
|
Some VMs, after reverting to snapshot, are renewing their dhcp lease after our tests are running, causing apparent network errors. This test will renew the lease early so it's good for a day (or whatever is configured at the dhcp server), rather than just a few seconds.
|
19160
19443
|
```
|
19161
|
-
### <a name = "pe2.0.0">pe2.0.0 - 31 Jan, 2012 (8d064e33)
|
19162
|
-
|
19163
|
-
* (maint) remove version checking for --pe-version option (8d064e33)
|
19164
|
-
|
19165
|
-
|
19166
|
-
```
|
19167
|
-
(maint) remove version checking for --pe-version option
|
19168
|
-
|
19169
|
-
Checking for a specific PE version serves no real purpose; if
|
19170
|
-
an invalid version is passed the hassness will halt with an
|
19171
|
-
apporiate error indicating the vesrion needed is not found.
|
19172
|
-
```
|
19173
|
-
* (maint) Add support to install alt versions of PE (15bfaeed)
|
19174
|
-
|
19175
|
-
|
19176
|
-
```
|
19177
|
-
(maint) Add support to install alt versions of PE
|
19178
|
-
|
19179
|
-
Need the ability to install more than just the LASTEST tarball
|
19180
|
-
of PE; passing --pe-version 2.0.0 will install PE 2.0.0 from
|
19181
|
-
/opt/enterptise/dists/pe2.0.0
|
19182
|
-
If --pe-version is ommited, version is derived from LATEST and
|
19183
|
-
/opt/enterprise/dist is used for the path.
|
19184
|
-
```
|
19185
19444
|
### <a name = "pe2.0">pe2.0 - 11 Nov, 2011 (4d7b65b6)
|
19186
19445
|
|
19187
19446
|
* Merge pull request #81 from djm68/add_cert_sign_master_dashboard (4d7b65b6)
|
data/beaker.gemspec
CHANGED
@@ -38,6 +38,7 @@ Gem::Specification.new do |s|
|
|
38
38
|
s.add_runtime_dependency 'net-scp', '~> 1.2'
|
39
39
|
s.add_runtime_dependency 'inifile', '~> 2.0'
|
40
40
|
s.add_runtime_dependency 'rsync', '~> 1.0.9'
|
41
|
+
s.add_runtime_dependency 'open_uri_redirections', '~> 0.2.1'
|
41
42
|
|
42
43
|
# Optional provisioner specific support
|
43
44
|
s.add_runtime_dependency 'rbvmomi', '~> 1.8'
|
data/lib/beaker/answers.rb
CHANGED
@@ -20,10 +20,12 @@ module Beaker
|
|
20
20
|
# - q_puppet_enterpriseconsole_database_user
|
21
21
|
|
22
22
|
the_answers.map do |vm, as|
|
23
|
-
as
|
24
|
-
key
|
25
|
-
|
26
|
-
|
23
|
+
if as
|
24
|
+
as.delete_if do |key, value|
|
25
|
+
key =~ /q_puppet_cloud_install/
|
26
|
+
#to be deleted in the future
|
27
|
+
#|q_puppet_enterpriseconsole_database_name|q_puppet_enterpriseconsole_database_password|q_puppet_enterpriseconsole_database_user/
|
28
|
+
end
|
27
29
|
end
|
28
30
|
end
|
29
31
|
|
@@ -32,7 +34,7 @@ module Beaker
|
|
32
34
|
install_update_server = answer_for(@options, :q_install_update_server, 'y')
|
33
35
|
|
34
36
|
the_answers.map do |key, value|
|
35
|
-
the_answers[key][:q_update_server_host] = update_server_host
|
37
|
+
the_answers[key][:q_update_server_host] = update_server_host if the_answers[key]
|
36
38
|
end
|
37
39
|
the_answers[master.name][:q_install_update_server] = install_update_server
|
38
40
|
|
data/lib/beaker/cli.rb
CHANGED
@@ -90,7 +90,7 @@ module Beaker
|
|
90
90
|
|
91
91
|
#testing phase
|
92
92
|
begin
|
93
|
-
run_suite(:tests)
|
93
|
+
run_suite(:tests, @options[:fail_mode])
|
94
94
|
#post acceptance phase
|
95
95
|
rescue => e
|
96
96
|
#post acceptance on failure
|
@@ -143,7 +143,7 @@ module Beaker
|
|
143
143
|
#@param [Symbol] suite_name The test suite to execute
|
144
144
|
#@param [String] failure_strategy How to proceed after a test failure, 'fast' = stop running tests immediately, 'slow' =
|
145
145
|
# continue to execute tests.
|
146
|
-
def run_suite(suite_name, failure_strategy =
|
146
|
+
def run_suite(suite_name, failure_strategy = nil)
|
147
147
|
if (@options[suite_name].empty?)
|
148
148
|
@logger.notify("No tests to run for suite '#{suite_name.to_s}'")
|
149
149
|
return
|
@@ -60,6 +60,14 @@ module Beaker
|
|
60
60
|
# 6. Revert Puppet to the pre-test state
|
61
61
|
# 7. Testing artifacts are saved in a folder named for the test
|
62
62
|
#
|
63
|
+
# @note Whether Puppet is started or restarted depends on what kind of
|
64
|
+
# server you're running. Passenger and puppetserver are restarted before.
|
65
|
+
# Webrick is started before and stopped after yielding, unless you're using
|
66
|
+
# service scripts, then it'll behave like passenger & puppetserver.
|
67
|
+
# Passenger and puppetserver (or webrick using service scripts)
|
68
|
+
# restart after yielding by default. You can stop this from happening
|
69
|
+
# by setting the :restart_when_done flag of the conf_opts argument.
|
70
|
+
#
|
63
71
|
# @param [Host] host One object that act like Host
|
64
72
|
#
|
65
73
|
# @param [Hash{Symbol=>String}] conf_opts Represents puppet settings.
|
@@ -85,6 +93,13 @@ module Beaker
|
|
85
93
|
# even if it seems the host has passenger.
|
86
94
|
# This is needed in FOSS tests to initialize
|
87
95
|
# SSL.
|
96
|
+
# @option conf_opts [Boolean] :restart_when_done determines whether a restart
|
97
|
+
# should be run after the test has been yielded to.
|
98
|
+
# Will stop puppet if false. Default behavior
|
99
|
+
# is to restart, but you can override this on the
|
100
|
+
# host or with this option.
|
101
|
+
# (Note: only works for passenger & puppetserver
|
102
|
+
# masters (or webrick using the service scripts))
|
88
103
|
# @param [File] testdir The temporary directory which will hold backup
|
89
104
|
# configuration, and other test artifacts.
|
90
105
|
#
|
@@ -110,7 +125,10 @@ module Beaker
|
|
110
125
|
raise(ArgumentError, "with_puppet_running_on's conf_opts must be a Hash. You provided a #{conf_opts.class}: '#{conf_opts}'") if !conf_opts.kind_of?(Hash)
|
111
126
|
cmdline_args = conf_opts[:__commandline_args__]
|
112
127
|
service_args = conf_opts[:__service_args__] || {}
|
113
|
-
|
128
|
+
restart_when_done = true
|
129
|
+
restart_when_done = host[:restart_when_done] if host[:restart_when_done]
|
130
|
+
restart_when_done = conf_opts.fetch(:restart_when_done, restart_when_done)
|
131
|
+
conf_opts = conf_opts.reject { |k,v| [:__commandline_args__, :__service_args__, :restart_when_done].include?(k) }
|
114
132
|
|
115
133
|
curl_retries = host['master-start-curl-retries'] || options['master-start-curl-retries']
|
116
134
|
logger.debug "Setting curl retries to #{curl_retries}"
|
@@ -163,7 +181,11 @@ module Beaker
|
|
163
181
|
|
164
182
|
if host.use_service_scripts? && !service_args[:bypass_service_script]
|
165
183
|
restore_puppet_conf_from_backup( host, backup_file )
|
166
|
-
|
184
|
+
if restart_when_done
|
185
|
+
bounce_service( host, host['puppetservice'], curl_retries )
|
186
|
+
else
|
187
|
+
host.exec puppet_resource('service', host['puppetservice'], 'ensure=stopped')
|
188
|
+
end
|
167
189
|
else
|
168
190
|
if puppet_master_started
|
169
191
|
stop_puppet_from_source_on( host )
|