puppetlabs_spec_helper 2.9.1 → 2.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +17 -0
- data/README.md +18 -13
- data/lib/puppetlabs_spec_helper/rake_tasks.rb +26 -0
- data/lib/puppetlabs_spec_helper/tasks/beaker.rb +3 -2
- data/lib/puppetlabs_spec_helper/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0b2a921cc114d8a5ce52a27f063c8df99910a603
|
4
|
+
data.tar.gz: d0dfa70b4a9636b1835c52cb21fe526c20ab90cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e773f370727f0c26dcabf4bb09285280708aa09cba82a56fae35eeba7f2d2d2319c7e6b394220b4e44088d42c0c926344292d73a1a998e00767342f70bd5769
|
7
|
+
data.tar.gz: b3696a6a92f84f6506f37f0de8a0bd8194356d826b4e57ed9b5f44fe0eca9ec821f9696c7160d8fcb138ae33669164b5bdc5701696ff3ef05c85e03b2282c785
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,19 @@
|
|
3
3
|
All significant changes to this repo will be summarized in this file.
|
4
4
|
|
5
5
|
|
6
|
+
## [v2.10.0](https://github.com/puppetlabs/puppetlabs_spec_helper/tree/v2.10.0) (2018-08-30)
|
7
|
+
[Full Changelog](https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.9.1...v2.10.0)
|
8
|
+
|
9
|
+
**Implemented enhancements:**
|
10
|
+
|
11
|
+
- \(feat\) add puppet lint fix task [\#255](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/255) ([tphoney](https://github.com/tphoney))
|
12
|
+
- add support to override the allowed test tiers [\#253](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/253) ([b4ldr](https://github.com/b4ldr))
|
13
|
+
|
14
|
+
**Merged pull requests:**
|
15
|
+
|
16
|
+
- Update documentation for older Puppet versions [\#254](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/254) ([op-ct](https://github.com/op-ct))
|
17
|
+
- update README [\#252](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/252) ([b4ldr](https://github.com/b4ldr))
|
18
|
+
|
6
19
|
## [v2.9.1](https://github.com/puppetlabs/puppetlabs_spec_helper/tree/v2.9.1) (2018-06-20)
|
7
20
|
[Full Changelog](https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.9.0...v2.9.1)
|
8
21
|
|
@@ -11,6 +24,10 @@ All significant changes to this repo will be summarized in this file.
|
|
11
24
|
- \(PDK-1031\) Remove thread-unsafe Dir.chdir usage [\#249](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/249) ([rodjek](https://github.com/rodjek))
|
12
25
|
- \(PDK-1033\) Use `--unshallow` when fetching a ref [\#247](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/247) ([DavidS](https://github.com/DavidS))
|
13
26
|
|
27
|
+
**Merged pull requests:**
|
28
|
+
|
29
|
+
- \(maint\) - Release prep for 2.9.1 [\#251](https://github.com/puppetlabs/puppetlabs_spec_helper/pull/251) ([pmcmaw](https://github.com/pmcmaw))
|
30
|
+
|
14
31
|
## [v2.9.0](https://github.com/puppetlabs/puppetlabs_spec_helper/tree/v2.9.0) (2018-06-18)
|
15
32
|
[Full Changelog](https://github.com/puppetlabs/puppetlabs_spec_helper/compare/v2.8.0...v2.9.0)
|
16
33
|
|
data/README.md
CHANGED
@@ -141,9 +141,6 @@ A number of the Puppet parser features, controlled via configuration during a
|
|
141
141
|
normal puppet run, can be controlled by exporting specific environment
|
142
142
|
variables for the spec run. These are:
|
143
143
|
|
144
|
-
* ``FUTURE_PARSER`` - set to "yes" to enable the [future parser](http://docs.puppetlabs.com/puppet/latest/reference/experiments_future.html),
|
145
|
-
the equivalent of setting [parser=future](http://docs.puppetlabs.com/references/latest/configuration.html#parser)
|
146
|
-
in puppet.conf.
|
147
144
|
* ``STRICT_VARIABLES`` - set to "yes" to enable set to strict variable checking when using Puppet versions between 3.5 and 4.0;
|
148
145
|
set to "no" to disable strict variable checking on Puppet versions 4.0, and later.
|
149
146
|
See [strict_variables](http://docs.puppetlabs.com/references/latest/configuration.html#strictvariables)
|
@@ -152,14 +149,18 @@ variables for the spec run. These are:
|
|
152
149
|
to set the order of unrelated resources when applying a catalog. Leave unset for the default
|
153
150
|
behavior, currently "random". This is equivalent to setting [ordering](http://docs.puppetlabs.com/references/latest/configuration.html#ordering)
|
154
151
|
in puppet.conf.
|
155
|
-
*
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
* ``TRUSTED_NODE_DATA`` - set to "yes" to enable [the $facts hash and trusted node data](
|
160
|
-
|
161
|
-
|
162
|
-
|
152
|
+
* The following options only affect Puppet 3.x:
|
153
|
+
* ``FUTURE_PARSER`` _(Puppet 3.x, starting with 3.2)_ - set to "yes" to enable the [future parser](https://docs.puppet.com/puppet/3/experiments_future.html),
|
154
|
+
the equivalent of setting [parser=future](https://puppet.com/docs/puppet/3.8/configuration.html#parser)
|
155
|
+
in puppet.conf.
|
156
|
+
* ``TRUSTED_NODE_DATA`` _(Puppet 3.x, starting with 3.4)_ - set to "yes" to enable [the $facts hash and trusted node data](https://puppet.com/docs/puppet/3.8/lang_facts_and_builtin_vars.html#trusted-facts),
|
157
|
+
which enabled ``$facts`` and ``$trusted`` hashes. This is equivalent to setting
|
158
|
+
[trusted_node_data=true](https://puppet.com/docs/puppet/3.8/configuration.html#trustednodedata)
|
159
|
+
in puppet.conf.
|
160
|
+
* ``STRINGIFY_FACTS`` _(Puppet 3.x, starting with 3.5)_ - set to "no" to enable [structured facts](http://docs.puppetlabs.com/facter/2.0/fact_overview.html#writing-structured-facts),
|
161
|
+
otherwise leave unset to retain the current default behavior. This is equivalent to setting
|
162
|
+
[stringify_facts=false](https://puppet.com/docs/puppet/3.8/configuration.html#stringifyfacts)
|
163
|
+
in puppet.conf.
|
163
164
|
|
164
165
|
As an example, to run spec tests with the future parser, strict variable checking,
|
165
166
|
and manifest ordering, you would:
|
@@ -346,12 +347,16 @@ remembering to duplicate any existing environment variables:
|
|
346
347
|
- FUTURE_PARSER=yes CI_NODE_TOTAL=2 CI_NODE_INDEX=2
|
347
348
|
|
348
349
|
#### Running tests tagged with test tiers
|
349
|
-
To run tests tagged with risk levels set the ``TEST_TIERS`` environment variable to a comma-separated list of
|
350
|
-
the appropriate tiers.
|
350
|
+
To run tests tagged with risk levels set the ``TEST_TIERS`` environment variable to a comma-separated list of the appropriate tiers.
|
351
351
|
|
352
352
|
For example: to run tests marked ``tier_high => true`` and ``tier_medium => true`` in the same test run set the
|
353
353
|
environment variable``TEST_TIERS=high,medium``
|
354
354
|
|
355
|
+
By default ``TEST_TIERS`` only accepts low, medium and high as valid tiers. If you would like to use your own keywords to set the environment variable ``TEST_TIERS_ALLOWED``.
|
356
|
+
|
357
|
+
For example: to use the keywords dev, rnd, staging and production you can set
|
358
|
+
``TEST_TIERS_ALLOWED=dev,rnd,staging,production``. Then you would be able to run tests marked ``tier_dev => true``, ``tier_production => true`` with ``TEST_TIERS=dev,production``
|
359
|
+
|
355
360
|
Note, if the ``TEST_TIERS`` environment variable is set to empty string or nil, all tiers will be executed.
|
356
361
|
|
357
362
|
|
@@ -131,10 +131,36 @@ PuppetLint::RakeTask.new(:lint) do |config|
|
|
131
131
|
140chars
|
132
132
|
class_inherits_from_params_class
|
133
133
|
class_parameter_defaults
|
134
|
+
disable_autoloader_layout
|
134
135
|
documentation
|
135
136
|
single_quote_string_with_variables
|
136
137
|
]
|
137
138
|
config.ignore_paths = [
|
139
|
+
'.vendor/**/*.pp',
|
140
|
+
'bundle/**/*.pp',
|
141
|
+
'pkg/**/*.pp',
|
142
|
+
'spec/**/*.pp',
|
143
|
+
'tests/**/*.pp',
|
144
|
+
'types/**/*.pp',
|
145
|
+
'vendor/**/*.pp',
|
146
|
+
]
|
147
|
+
end
|
148
|
+
|
149
|
+
desc 'Run puppet-lint and fix issues automatically'
|
150
|
+
PuppetLint::RakeTask.new(:lint_fix) do |config|
|
151
|
+
config.fail_on_warnings = true
|
152
|
+
config.fix = true
|
153
|
+
config.disable_checks = %w[
|
154
|
+
80chars
|
155
|
+
140chars
|
156
|
+
class_inherits_from_params_class
|
157
|
+
class_parameter_defaults
|
158
|
+
disable_autoloader_layout
|
159
|
+
documentation
|
160
|
+
single_quote_string_with_variables
|
161
|
+
]
|
162
|
+
config.ignore_paths = [
|
163
|
+
'.vendor/**/*.pp',
|
138
164
|
'bundle/**/*.pp',
|
139
165
|
'pkg/**/*.pp',
|
140
166
|
'spec/**/*.pp',
|
@@ -64,10 +64,11 @@ class SetupBeaker
|
|
64
64
|
# TEST_TIERS env variable is a comma separated list of tiers to run. e.g. low, medium, high
|
65
65
|
if ENV['TEST_TIERS']
|
66
66
|
test_tiers = ENV['TEST_TIERS'].split(',')
|
67
|
-
|
67
|
+
test_tiers_allowed = ENV.fetch('TEST_TIERS_ALLOWED', 'low,medium,high').split(',')
|
68
|
+
raise 'TEST_TIERS env variable must have at least 1 tier specified. Either low, medium or high or one of the tiers listed in TEST_TIERS_ALLOWED (comma separated).' if test_tiers.count == 0
|
68
69
|
test_tiers.each do |tier|
|
69
70
|
tier_to_add = tier.strip.downcase
|
70
|
-
raise "#{tier_to_add} not a valid test tier." unless
|
71
|
+
raise "#{tier_to_add} not a valid test tier." unless test_tiers_allowed.include?(tier_to_add)
|
71
72
|
tiers = "--tag tier_#{tier_to_add}"
|
72
73
|
t.rspec_opts.push(tiers)
|
73
74
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppetlabs_spec_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet, Inc.
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-08-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mocha
|
@@ -220,7 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
220
220
|
version: '0'
|
221
221
|
requirements: []
|
222
222
|
rubyforge_project:
|
223
|
-
rubygems_version: 2.
|
223
|
+
rubygems_version: 2.5.1
|
224
224
|
signing_key:
|
225
225
|
specification_version: 4
|
226
226
|
summary: Standard tasks and configuration for module spec tests.
|