simp-beaker-helpers 1.9.0 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +546 -0
- data/CHANGELOG.md +11 -0
- data/Gemfile +3 -2
- data/files/puppet-agent-versions.yaml +3 -0
- data/lib/simp/beaker_helpers.rb +25 -7
- data/lib/simp/beaker_helpers/version.rb +1 -1
- data/lib/simp/rake/beaker.rb +7 -2
- data/simp-beaker-helpers.gemspec +1 -0
- data/spec/acceptance/check_puppet_version_spec.rb +23 -0
- data/spec/acceptance/nodesets/puppet5.yml +23 -0
- metadata +19 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccdf0a376a641c3380cf3007e24ad0fcdb09465f98e45fc6bac483eb897a28bf
|
4
|
+
data.tar.gz: d11989a7cc3be493a17ff575b8394a762f180cf4889ca2e223cfccd230ff50b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d06ef5f63eae54bd6889d32b3b53069d6836ac6f8855520f4ce29f151b708e0f5a49167d3aee33cdcb1295930b3ac717a2b9277396d34adaef413e65c29bd2e9
|
7
|
+
data.tar.gz: 2da83080d5daabe72885096d423aa0de6ae1d5b246570f186b86bc8f70842df9c09f1bc79a0f4a9d80c2822b772d0a407ad3c16076c8eaf04262e925aa450f93
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,546 @@
|
|
1
|
+
require: rubocop-rspec
|
2
|
+
AllCops:
|
3
|
+
TargetRubyVersion: 2.4
|
4
|
+
Include:
|
5
|
+
- ./**/*.rb
|
6
|
+
Exclude:
|
7
|
+
- files/**/*
|
8
|
+
- vendor/**/*
|
9
|
+
- .vendor/**/*
|
10
|
+
- pkg/**/*
|
11
|
+
- spec/fixtures/**/*
|
12
|
+
- Gemfile
|
13
|
+
- Rakefile
|
14
|
+
- Guardfile
|
15
|
+
- Vagrantfile
|
16
|
+
Lint/ConditionPosition:
|
17
|
+
Enabled: True
|
18
|
+
|
19
|
+
Lint/ElseLayout:
|
20
|
+
Enabled: True
|
21
|
+
|
22
|
+
Lint/UnreachableCode:
|
23
|
+
Enabled: True
|
24
|
+
|
25
|
+
Lint/UselessComparison:
|
26
|
+
Enabled: True
|
27
|
+
|
28
|
+
Lint/EnsureReturn:
|
29
|
+
Enabled: True
|
30
|
+
|
31
|
+
Lint/HandleExceptions:
|
32
|
+
Enabled: True
|
33
|
+
|
34
|
+
Lint/LiteralAsCondition:
|
35
|
+
Enabled: True
|
36
|
+
|
37
|
+
Lint/ShadowingOuterLocalVariable:
|
38
|
+
Enabled: True
|
39
|
+
|
40
|
+
Lint/LiteralInInterpolation:
|
41
|
+
Enabled: True
|
42
|
+
|
43
|
+
Style/HashSyntax:
|
44
|
+
Enabled: False
|
45
|
+
|
46
|
+
Style/RedundantReturn:
|
47
|
+
Enabled: True
|
48
|
+
|
49
|
+
Layout/EndOfLine:
|
50
|
+
Enabled: False
|
51
|
+
|
52
|
+
Lint/AmbiguousOperator:
|
53
|
+
Enabled: True
|
54
|
+
|
55
|
+
Lint/AssignmentInCondition:
|
56
|
+
Enabled: True
|
57
|
+
|
58
|
+
Layout/SpaceBeforeComment:
|
59
|
+
Enabled: True
|
60
|
+
|
61
|
+
Style/AndOr:
|
62
|
+
Enabled: True
|
63
|
+
|
64
|
+
Style/RedundantSelf:
|
65
|
+
Enabled: True
|
66
|
+
|
67
|
+
Metrics/BlockLength:
|
68
|
+
Enabled: False
|
69
|
+
|
70
|
+
# Method length is not necessarily an indicator of code quality
|
71
|
+
Metrics/MethodLength:
|
72
|
+
Enabled: False
|
73
|
+
|
74
|
+
# Module length is not necessarily an indicator of code quality
|
75
|
+
Metrics/ModuleLength:
|
76
|
+
Enabled: False
|
77
|
+
|
78
|
+
Style/WhileUntilModifier:
|
79
|
+
Enabled: True
|
80
|
+
|
81
|
+
Lint/AmbiguousRegexpLiteral:
|
82
|
+
Enabled: True
|
83
|
+
|
84
|
+
Security/Eval:
|
85
|
+
Enabled: True
|
86
|
+
|
87
|
+
Lint/BlockAlignment:
|
88
|
+
Enabled: True
|
89
|
+
|
90
|
+
Lint/DefEndAlignment:
|
91
|
+
Enabled: True
|
92
|
+
|
93
|
+
Lint/EndAlignment:
|
94
|
+
Enabled: True
|
95
|
+
|
96
|
+
Lint/DeprecatedClassMethods:
|
97
|
+
Enabled: True
|
98
|
+
|
99
|
+
Lint/Loop:
|
100
|
+
Enabled: True
|
101
|
+
|
102
|
+
Lint/ParenthesesAsGroupedExpression:
|
103
|
+
Enabled: True
|
104
|
+
|
105
|
+
Lint/RescueException:
|
106
|
+
Enabled: True
|
107
|
+
|
108
|
+
Lint/StringConversionInInterpolation:
|
109
|
+
Enabled: True
|
110
|
+
|
111
|
+
Lint/UnusedBlockArgument:
|
112
|
+
Enabled: True
|
113
|
+
|
114
|
+
Lint/UnusedMethodArgument:
|
115
|
+
Enabled: True
|
116
|
+
|
117
|
+
Lint/UselessAccessModifier:
|
118
|
+
Enabled: True
|
119
|
+
|
120
|
+
Lint/UselessAssignment:
|
121
|
+
Enabled: True
|
122
|
+
|
123
|
+
Lint/Void:
|
124
|
+
Enabled: True
|
125
|
+
|
126
|
+
Layout/AccessModifierIndentation:
|
127
|
+
Enabled: True
|
128
|
+
|
129
|
+
Naming/AccessorMethodName:
|
130
|
+
Enabled: True
|
131
|
+
|
132
|
+
Style/Alias:
|
133
|
+
Enabled: True
|
134
|
+
|
135
|
+
Layout/AlignArray:
|
136
|
+
Enabled: True
|
137
|
+
|
138
|
+
Layout/AlignHash:
|
139
|
+
Enabled: True
|
140
|
+
|
141
|
+
Layout/AlignParameters:
|
142
|
+
Enabled: True
|
143
|
+
|
144
|
+
Metrics/BlockNesting:
|
145
|
+
Enabled: True
|
146
|
+
|
147
|
+
Style/AsciiComments:
|
148
|
+
Enabled: True
|
149
|
+
|
150
|
+
Style/Attr:
|
151
|
+
Enabled: True
|
152
|
+
|
153
|
+
Style/BracesAroundHashParameters:
|
154
|
+
Enabled: True
|
155
|
+
|
156
|
+
Style/CaseEquality:
|
157
|
+
Enabled: True
|
158
|
+
|
159
|
+
Layout/CaseIndentation:
|
160
|
+
Enabled: True
|
161
|
+
|
162
|
+
Style/CharacterLiteral:
|
163
|
+
Enabled: True
|
164
|
+
|
165
|
+
Naming/ClassAndModuleCamelCase:
|
166
|
+
Enabled: True
|
167
|
+
|
168
|
+
Style/ClassAndModuleChildren:
|
169
|
+
Enabled: False
|
170
|
+
|
171
|
+
Style/ClassCheck:
|
172
|
+
Enabled: True
|
173
|
+
|
174
|
+
# Class length is not necessarily an indicator of code quality
|
175
|
+
Metrics/ClassLength:
|
176
|
+
Enabled: False
|
177
|
+
|
178
|
+
Style/ClassMethods:
|
179
|
+
Enabled: True
|
180
|
+
|
181
|
+
Style/ClassVars:
|
182
|
+
Enabled: True
|
183
|
+
|
184
|
+
Style/WhenThen:
|
185
|
+
Enabled: True
|
186
|
+
|
187
|
+
Style/WordArray:
|
188
|
+
Enabled: True
|
189
|
+
|
190
|
+
Style/UnneededPercentQ:
|
191
|
+
Enabled: True
|
192
|
+
|
193
|
+
Layout/Tab:
|
194
|
+
Enabled: True
|
195
|
+
|
196
|
+
Layout/SpaceBeforeSemicolon:
|
197
|
+
Enabled: True
|
198
|
+
|
199
|
+
Layout/TrailingBlankLines:
|
200
|
+
Enabled: True
|
201
|
+
|
202
|
+
Layout/SpaceInsideBlockBraces:
|
203
|
+
Enabled: True
|
204
|
+
|
205
|
+
Layout/SpaceInsideHashLiteralBraces:
|
206
|
+
Enabled: True
|
207
|
+
|
208
|
+
Layout/SpaceInsideParens:
|
209
|
+
Enabled: True
|
210
|
+
|
211
|
+
Layout/LeadingCommentSpace:
|
212
|
+
Enabled: True
|
213
|
+
|
214
|
+
Layout/SpaceBeforeFirstArg:
|
215
|
+
Enabled: True
|
216
|
+
|
217
|
+
Layout/SpaceAfterColon:
|
218
|
+
Enabled: True
|
219
|
+
|
220
|
+
Layout/SpaceAfterComma:
|
221
|
+
Enabled: True
|
222
|
+
|
223
|
+
Layout/SpaceAfterMethodName:
|
224
|
+
Enabled: True
|
225
|
+
|
226
|
+
Layout/SpaceAfterNot:
|
227
|
+
Enabled: True
|
228
|
+
|
229
|
+
Layout/SpaceAfterSemicolon:
|
230
|
+
Enabled: True
|
231
|
+
|
232
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
233
|
+
Enabled: True
|
234
|
+
|
235
|
+
Layout/SpaceAroundOperators:
|
236
|
+
Enabled: True
|
237
|
+
|
238
|
+
Layout/SpaceBeforeBlockBraces:
|
239
|
+
Enabled: True
|
240
|
+
|
241
|
+
Layout/SpaceBeforeComma:
|
242
|
+
Enabled: True
|
243
|
+
|
244
|
+
Style/CollectionMethods:
|
245
|
+
Enabled: True
|
246
|
+
|
247
|
+
Layout/CommentIndentation:
|
248
|
+
Enabled: True
|
249
|
+
|
250
|
+
Style/ColonMethodCall:
|
251
|
+
Enabled: True
|
252
|
+
|
253
|
+
Style/CommentAnnotation:
|
254
|
+
Enabled: True
|
255
|
+
|
256
|
+
# 'Complexity' is very relative
|
257
|
+
Metrics/CyclomaticComplexity:
|
258
|
+
Enabled: False
|
259
|
+
|
260
|
+
Naming/ConstantName:
|
261
|
+
Enabled: True
|
262
|
+
|
263
|
+
Style/Documentation:
|
264
|
+
Enabled: False
|
265
|
+
|
266
|
+
Style/DefWithParentheses:
|
267
|
+
Enabled: True
|
268
|
+
|
269
|
+
Style/PreferredHashMethods:
|
270
|
+
Enabled: True
|
271
|
+
|
272
|
+
Layout/DotPosition:
|
273
|
+
EnforcedStyle: trailing
|
274
|
+
|
275
|
+
Style/DoubleNegation:
|
276
|
+
Enabled: True
|
277
|
+
|
278
|
+
Style/EachWithObject:
|
279
|
+
Enabled: True
|
280
|
+
|
281
|
+
Layout/EmptyLineBetweenDefs:
|
282
|
+
Enabled: True
|
283
|
+
|
284
|
+
Layout/IndentArray:
|
285
|
+
Enabled: True
|
286
|
+
|
287
|
+
Layout/IndentHash:
|
288
|
+
Enabled: True
|
289
|
+
|
290
|
+
Layout/IndentationConsistency:
|
291
|
+
Enabled: True
|
292
|
+
|
293
|
+
Layout/IndentationWidth:
|
294
|
+
Enabled: True
|
295
|
+
|
296
|
+
Layout/EmptyLines:
|
297
|
+
Enabled: True
|
298
|
+
|
299
|
+
Layout/EmptyLinesAroundAccessModifier:
|
300
|
+
Enabled: True
|
301
|
+
|
302
|
+
Style/EmptyLiteral:
|
303
|
+
Enabled: True
|
304
|
+
|
305
|
+
# Configuration parameters: AllowURI, URISchemes.
|
306
|
+
Layout/TrailingWhitespace:
|
307
|
+
Enabled: True
|
308
|
+
|
309
|
+
Metrics/LineLength:
|
310
|
+
Enabled: False
|
311
|
+
|
312
|
+
Naming/BinaryOperatorParameterName:
|
313
|
+
Enabled: True
|
314
|
+
|
315
|
+
Style/CommandLiteral:
|
316
|
+
EnforcedStyle: percent_x
|
317
|
+
Enabled: True
|
318
|
+
|
319
|
+
Style/MethodCallWithoutArgsParentheses:
|
320
|
+
Enabled: True
|
321
|
+
|
322
|
+
Style/MethodDefParentheses:
|
323
|
+
Enabled: True
|
324
|
+
|
325
|
+
Style/LineEndConcatenation:
|
326
|
+
Enabled: True
|
327
|
+
|
328
|
+
Style/StringLiterals:
|
329
|
+
Enabled: True
|
330
|
+
|
331
|
+
Style/TrailingCommaInArguments:
|
332
|
+
Enabled: True
|
333
|
+
|
334
|
+
Style/TrailingCommaInLiteral:
|
335
|
+
Enabled: True
|
336
|
+
|
337
|
+
Style/GlobalVars:
|
338
|
+
Enabled: True
|
339
|
+
|
340
|
+
Style/GuardClause:
|
341
|
+
Enabled: True
|
342
|
+
|
343
|
+
Style/IfUnlessModifier:
|
344
|
+
Enabled: True
|
345
|
+
|
346
|
+
Style/MultilineIfThen:
|
347
|
+
Enabled: True
|
348
|
+
|
349
|
+
Style/NegatedIf:
|
350
|
+
Enabled: True
|
351
|
+
|
352
|
+
Style/NegatedWhile:
|
353
|
+
Enabled: True
|
354
|
+
|
355
|
+
Style/Next:
|
356
|
+
Enabled: True
|
357
|
+
|
358
|
+
Style/SingleLineBlockParams:
|
359
|
+
Enabled: True
|
360
|
+
|
361
|
+
Style/SingleLineMethods:
|
362
|
+
Enabled: True
|
363
|
+
|
364
|
+
Style/SpecialGlobalVars:
|
365
|
+
Enabled: True
|
366
|
+
|
367
|
+
Style/TrivialAccessors:
|
368
|
+
Enabled: True
|
369
|
+
|
370
|
+
Style/UnlessElse:
|
371
|
+
Enabled: True
|
372
|
+
|
373
|
+
Style/VariableInterpolation:
|
374
|
+
Enabled: True
|
375
|
+
|
376
|
+
Naming/VariableName:
|
377
|
+
Enabled: True
|
378
|
+
|
379
|
+
Style/WhileUntilDo:
|
380
|
+
Enabled: True
|
381
|
+
|
382
|
+
Style/EvenOdd:
|
383
|
+
Enabled: True
|
384
|
+
|
385
|
+
Naming/FileName:
|
386
|
+
Enabled: True
|
387
|
+
|
388
|
+
Style/For:
|
389
|
+
Enabled: True
|
390
|
+
|
391
|
+
Style/Lambda:
|
392
|
+
Enabled: True
|
393
|
+
|
394
|
+
Naming/MethodName:
|
395
|
+
Enabled: True
|
396
|
+
|
397
|
+
Style/MultilineTernaryOperator:
|
398
|
+
Enabled: True
|
399
|
+
|
400
|
+
Style/NestedTernaryOperator:
|
401
|
+
Enabled: True
|
402
|
+
|
403
|
+
Style/NilComparison:
|
404
|
+
Enabled: True
|
405
|
+
|
406
|
+
Style/FormatString:
|
407
|
+
Enabled: True
|
408
|
+
|
409
|
+
Style/MultilineBlockChain:
|
410
|
+
Enabled: True
|
411
|
+
|
412
|
+
Style/Semicolon:
|
413
|
+
Enabled: True
|
414
|
+
|
415
|
+
Style/SignalException:
|
416
|
+
Enabled: True
|
417
|
+
|
418
|
+
Style/NonNilCheck:
|
419
|
+
Enabled: True
|
420
|
+
|
421
|
+
Style/Not:
|
422
|
+
Enabled: True
|
423
|
+
|
424
|
+
Style/NumericLiterals:
|
425
|
+
Enabled: True
|
426
|
+
|
427
|
+
Style/OneLineConditional:
|
428
|
+
Enabled: True
|
429
|
+
|
430
|
+
Style/ParenthesesAroundCondition:
|
431
|
+
Enabled: True
|
432
|
+
|
433
|
+
Style/PercentLiteralDelimiters:
|
434
|
+
Enabled: True
|
435
|
+
|
436
|
+
Style/PerlBackrefs:
|
437
|
+
Enabled: True
|
438
|
+
|
439
|
+
Naming/PredicateName:
|
440
|
+
Enabled: True
|
441
|
+
|
442
|
+
Style/RedundantException:
|
443
|
+
Enabled: True
|
444
|
+
|
445
|
+
Style/SelfAssignment:
|
446
|
+
Enabled: True
|
447
|
+
|
448
|
+
Style/Proc:
|
449
|
+
Enabled: True
|
450
|
+
|
451
|
+
Style/RaiseArgs:
|
452
|
+
Enabled: True
|
453
|
+
|
454
|
+
Style/RedundantBegin:
|
455
|
+
Enabled: True
|
456
|
+
|
457
|
+
Style/RescueModifier:
|
458
|
+
Enabled: True
|
459
|
+
|
460
|
+
# based on https://github.com/voxpupuli/modulesync_config/issues/168
|
461
|
+
Style/RegexpLiteral:
|
462
|
+
EnforcedStyle: percent_r
|
463
|
+
Enabled: True
|
464
|
+
|
465
|
+
Lint/UnderscorePrefixedVariableName:
|
466
|
+
Enabled: True
|
467
|
+
|
468
|
+
Metrics/ParameterLists:
|
469
|
+
Enabled: False
|
470
|
+
|
471
|
+
Lint/RequireParentheses:
|
472
|
+
Enabled: True
|
473
|
+
|
474
|
+
Style/ModuleFunction:
|
475
|
+
Enabled: True
|
476
|
+
|
477
|
+
Lint/Debugger:
|
478
|
+
Enabled: True
|
479
|
+
|
480
|
+
Style/IfWithSemicolon:
|
481
|
+
Enabled: True
|
482
|
+
|
483
|
+
Style/Encoding:
|
484
|
+
Enabled: True
|
485
|
+
|
486
|
+
Style/BlockDelimiters:
|
487
|
+
Enabled: True
|
488
|
+
|
489
|
+
Layout/MultilineBlockLayout:
|
490
|
+
Enabled: True
|
491
|
+
|
492
|
+
# 'Complexity' is very relative
|
493
|
+
Metrics/AbcSize:
|
494
|
+
Enabled: False
|
495
|
+
|
496
|
+
# 'Complexity' is very relative
|
497
|
+
Metrics/PerceivedComplexity:
|
498
|
+
Enabled: False
|
499
|
+
|
500
|
+
Lint/UselessAssignment:
|
501
|
+
Enabled: True
|
502
|
+
|
503
|
+
Layout/ClosingParenthesisIndentation:
|
504
|
+
Enabled: True
|
505
|
+
|
506
|
+
# RSpec
|
507
|
+
|
508
|
+
RSpec/BeforeAfterAll:
|
509
|
+
Exclude:
|
510
|
+
- spec/acceptance/**/*
|
511
|
+
|
512
|
+
# We don't use rspec in this way
|
513
|
+
RSpec/DescribeClass:
|
514
|
+
Enabled: False
|
515
|
+
|
516
|
+
# Example length is not necessarily an indicator of code quality
|
517
|
+
RSpec/ExampleLength:
|
518
|
+
Enabled: False
|
519
|
+
|
520
|
+
RSpec/NamedSubject:
|
521
|
+
Enabled: False
|
522
|
+
|
523
|
+
# disabled for now since they cause a lot of issues
|
524
|
+
# these issues aren't easy to fix
|
525
|
+
RSpec/RepeatedDescription:
|
526
|
+
Enabled: False
|
527
|
+
|
528
|
+
RSpec/NestedGroups:
|
529
|
+
Enabled: False
|
530
|
+
|
531
|
+
# this is broken on ruby1.9
|
532
|
+
Layout/IndentHeredoc:
|
533
|
+
Enabled: False
|
534
|
+
|
535
|
+
# disable Yaml safe_load. This is needed to support ruby2.0.0 development envs
|
536
|
+
Security/YAMLLoad:
|
537
|
+
Enabled: false
|
538
|
+
|
539
|
+
# This affects hiera interpolation, as well as some configs that we push.
|
540
|
+
Style/FormatStringToken:
|
541
|
+
Enabled: false
|
542
|
+
|
543
|
+
# This is useful, but sometimes a little too picky about where unit tests files
|
544
|
+
# are located.
|
545
|
+
RSpec/FilePath:
|
546
|
+
Enabled: false
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
### 1.10.0 / 2018-01-23
|
2
|
+
* Add support for Puppet 5
|
3
|
+
* Note: you need to set 'puppet_collection' to 'puppet5' to test Puppet 5 and
|
4
|
+
'aio' (or leave it out) to test Puppet less than 5
|
5
|
+
* Fix support for passing the 'ALL' suite to run all suites
|
6
|
+
* Updates per Rubocop
|
7
|
+
|
8
|
+
* Ensure that `rsync` is not used once `fips` is enabled on the SUT
|
9
|
+
* If `fips` is enabled on the SUT, but not the running host, rsync
|
10
|
+
connections have a high likelihood of failing
|
11
|
+
|
1
12
|
### 1.9.0 / 2018-01-01
|
2
13
|
* Ensure that all host IP addresses get added to the internally generated PKI
|
3
14
|
keys as subjectAltNames. Kubernetes needs this and it does not hurt to have
|
data/Gemfile
CHANGED
@@ -13,10 +13,11 @@ gem 'bundler'
|
|
13
13
|
gem 'rake'
|
14
14
|
|
15
15
|
group :system_tests do
|
16
|
-
gem 'pry'
|
17
16
|
gem 'beaker'
|
18
17
|
gem 'beaker-rspec'
|
19
18
|
gem 'net-ssh'
|
20
|
-
gem 'puppetlabs_spec_helper'
|
21
19
|
gem 'puppet', ENV.fetch('PUPPET_VERSION', '~> 4.0')
|
20
|
+
gem 'puppetlabs_spec_helper'
|
21
|
+
gem 'rubocop'
|
22
|
+
gem 'rubocop-rspec'
|
22
23
|
end
|
data/lib/simp/beaker_helpers.rb
CHANGED
@@ -11,14 +11,22 @@ module Simp::BeakerHelpers
|
|
11
11
|
# oldest system that we support.
|
12
12
|
DEFAULT_PUPPET_AGENT_VERSION = '1.7.1'
|
13
13
|
|
14
|
+
# We can't cache this because it may change during a run
|
15
|
+
def fips_enabled(sut)
|
16
|
+
return on( sut,
|
17
|
+
'cat /proc/sys/crypto/fips_enabled 2>/dev/null',
|
18
|
+
:accept_all_exit_codes => true
|
19
|
+
).output.strip == '1'
|
20
|
+
end
|
21
|
+
|
14
22
|
# Figure out the best method to copy files to a host and use it
|
15
23
|
#
|
16
24
|
# Will create the directories leading up to the target if they don't exist
|
17
25
|
def copy_to(sut, src, dest, opts={})
|
18
|
-
unless @has_rsync
|
26
|
+
unless fips_enabled(sut) || @has_rsync
|
19
27
|
%x{which rsync 2>/dev/null}.strip
|
20
28
|
|
21
|
-
@has_rsync = $?.success?
|
29
|
+
@has_rsync = !$?.nil? && $?.success?
|
22
30
|
end
|
23
31
|
|
24
32
|
sut.mkdir_p(File.dirname(dest))
|
@@ -695,12 +703,22 @@ done
|
|
695
703
|
# Replacement for `install_puppet` in spec_helper_acceptance.rb
|
696
704
|
def install_puppet
|
697
705
|
puppet_install_type = ENV.fetch('PUPPET_INSTALL_TYPE', 'agent')
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
706
|
+
|
707
|
+
puppet_agent_version = ENV.fetch('PUPPET_INSTALL_VERSION', nil)
|
708
|
+
|
709
|
+
unless puppet_agent_version
|
710
|
+
if host.options['puppet_collection'] && host.options['puppet_collection'] =~ /puppet(\d+)/
|
711
|
+
puppet_agent_version = latest_puppet_agent_version_for($1)
|
712
|
+
else
|
713
|
+
puppet_agent_version = (
|
714
|
+
latest_puppet_agent_version_for(ENV.fetch('PUPPET_VERSION',nil)) ||
|
715
|
+
DEFAULT_PUPPET_AGENT_VERSION
|
716
|
+
)
|
717
|
+
end
|
718
|
+
end
|
719
|
+
|
703
720
|
require 'beaker/puppet_install_helper'
|
721
|
+
|
704
722
|
run_puppet_install_helper(puppet_install_type, puppet_agent_version)
|
705
723
|
end
|
706
724
|
end
|
data/lib/simp/rake/beaker.rb
CHANGED
@@ -117,7 +117,7 @@ module Simp::Rake
|
|
117
117
|
|
118
118
|
raise("Error: Suites Directory at '#{suite_basedir}'!") unless File.directory?(suite_basedir)
|
119
119
|
|
120
|
-
if suite
|
120
|
+
if suite && (suite != 'ALL')
|
121
121
|
unless File.directory?(File.join(suite_basedir, suite))
|
122
122
|
STDERR.puts("Error: Could not find suite '#{suite}'")
|
123
123
|
STDERR.puts("Available Suites:")
|
@@ -139,7 +139,8 @@ module Simp::Rake
|
|
139
139
|
end
|
140
140
|
|
141
141
|
suites = Hash.new
|
142
|
-
|
142
|
+
|
143
|
+
if suite && (suite != 'ALL')
|
143
144
|
suites[suite] = Hash.new
|
144
145
|
# If a suite was set, make sure it runs.
|
145
146
|
suites[suite]['default_run'] = true
|
@@ -147,6 +148,10 @@ module Simp::Rake
|
|
147
148
|
Dir.glob(File.join(suite_basedir,'*')) do |file|
|
148
149
|
if File.directory?(file)
|
149
150
|
suites[File.basename(file)] = Hash.new
|
151
|
+
|
152
|
+
if suite == 'ALL'
|
153
|
+
suites[File.basename(file)]['default_run'] = true
|
154
|
+
end
|
150
155
|
end
|
151
156
|
end
|
152
157
|
end
|
data/simp-beaker-helpers.gemspec
CHANGED
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
'issue_tracker' => 'https://simp-project.atlassian.net'
|
20
20
|
}
|
21
21
|
s.add_runtime_dependency 'beaker', '~> 3.14'
|
22
|
+
s.add_runtime_dependency 'beaker-puppet', '~> 0.8.0'
|
22
23
|
s.add_runtime_dependency 'beaker-puppet_install_helper', '~> 0.6'
|
23
24
|
|
24
25
|
### s.files = Dir['Rakefile', '{bin,lib,spec}/**/*', 'README*', 'LICENSE*'] & `git ls-files -z .`.split("\0")
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'spec_helper_acceptance'
|
2
|
+
|
3
|
+
hosts.each do |host|
|
4
|
+
describe 'make sure puppet version is valid' do
|
5
|
+
context "on #{host}" do
|
6
|
+
puppet_collection = host.options[:puppet_collection]
|
7
|
+
|
8
|
+
client_puppet_version = on(host, 'puppet --version').output.strip
|
9
|
+
|
10
|
+
if puppet_collection =~ /puppet(\d+)/
|
11
|
+
puppet_collection_version = $1
|
12
|
+
|
13
|
+
it "should be running puppet version #{puppet_collection_version}" do
|
14
|
+
expect(client_puppet_version.split('.').first).to eq(puppet_collection_version)
|
15
|
+
end
|
16
|
+
else
|
17
|
+
it 'should not be running puppet 5+' do
|
18
|
+
expect(client_puppet_version.split('.').first).to be < '5'
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
HOSTS:
|
2
|
+
server-el7:
|
3
|
+
roles:
|
4
|
+
- server
|
5
|
+
- default
|
6
|
+
- master
|
7
|
+
- el7
|
8
|
+
platform: el-7-x86_64
|
9
|
+
box: centos/7
|
10
|
+
hypervisor: vagrant
|
11
|
+
|
12
|
+
server-el6:
|
13
|
+
roles:
|
14
|
+
- el6
|
15
|
+
platform: el-6-x86_64
|
16
|
+
box: centos/6
|
17
|
+
hypervisor: vagrant
|
18
|
+
|
19
|
+
CONFIG:
|
20
|
+
log_level: verbose
|
21
|
+
type: aio
|
22
|
+
puppet_collection: puppet5
|
23
|
+
vagrant_memsize: 256
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simp-beaker-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Tessmer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-01-
|
12
|
+
date: 2018-01-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: beaker
|
@@ -25,6 +25,20 @@ dependencies:
|
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '3.14'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: beaker-puppet
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 0.8.0
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 0.8.0
|
28
42
|
- !ruby/object:Gem::Dependency
|
29
43
|
name: beaker-puppet_install_helper
|
30
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -49,6 +63,7 @@ files:
|
|
49
63
|
- ".fixtures.yml"
|
50
64
|
- ".gitignore"
|
51
65
|
- ".rspec"
|
66
|
+
- ".rubocop.yml"
|
52
67
|
- ".travis.yml"
|
53
68
|
- CHANGELOG.md
|
54
69
|
- Gemfile
|
@@ -66,9 +81,11 @@ files:
|
|
66
81
|
- lib/simp/beaker_helpers/version.rb
|
67
82
|
- lib/simp/rake/beaker.rb
|
68
83
|
- simp-beaker-helpers.gemspec
|
84
|
+
- spec/acceptance/check_puppet_version_spec.rb
|
69
85
|
- spec/acceptance/enable_fips_spec.rb
|
70
86
|
- spec/acceptance/fixture_modules_spec.rb
|
71
87
|
- spec/acceptance/nodesets/default.yml
|
88
|
+
- spec/acceptance/nodesets/puppet5.yml
|
72
89
|
- spec/acceptance/pki_tests_spec.rb
|
73
90
|
- spec/acceptance/set_hieradata_on_spec.rb
|
74
91
|
- spec/acceptance/write_hieradata_to_spec.rb
|