Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a transitive test property #821

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
4cc17cc
(GH-6) Set up GH Action for testing
da-ar Jul 26, 2021
7256406
Merge pull request #9 from puppetlabs/da-ar-patch-1
jpogran Jul 26, 2021
6b52d21
(GH-7) Removal of Appveyor and Travis CI jobs
da-ar Jul 26, 2021
b5fd36d
Merge pull request #10 from da-ar/GH-7/master/remove-old-ci
Jul 29, 2021
fba9168
Add Ruby 3 support
ekohl Jun 8, 2021
c8e68b5
Merge pull request #11 from bastelfreak/ruby-3
da-ar Aug 2, 2021
44cfcc2
(GH-5) Release prep for 2.10.0
da-ar Aug 2, 2021
0f7e9c2
(maint) update links to puppetlabs
da-ar Aug 2, 2021
84a9cfe
Merge pull request #12 from da-ar/release-prep
Aug 2, 2021
48c5605
Add setting to use custom Facter implementation
GabrielNagy Nov 1, 2021
796c4b2
Merge pull request #16 from GabrielNagy/facter-impl
ciprianbadescu Nov 10, 2021
bbda94d
Release Prep for 2.11.0
da-ar Nov 10, 2021
fa9b1ef
Merge pull request #17 from da-ar/release_prep
Nov 10, 2021
a346ced
Ensure FacterImpl consistency between example groups
GabrielNagy Dec 6, 2021
cafb92b
Lazily instantiate FacterTestImpl
GabrielNagy Dec 6, 2021
614347f
Use symbols for the facter_implementation setting
GabrielNagy Dec 6, 2021
baf75ac
Merge pull request #19 from GabrielNagy/facter-impl-consistency
ciprianbadescu Dec 10, 2021
0e791a3
(MAINT) Release prep for v2.11.1
Dec 10, 2021
d07db4c
Merge pull request #20 from puppetlabs/maint/master/release_prep_2_11_1
petergmurphy Dec 10, 2021
d0e595a
(MAINT) Add v2.11.1 entry to docs/changelog/index.md
Dec 10, 2021
0463408
Merge pull request #21 from puppetlabs/maint/master/2_11_1_changelog_…
petergmurphy Dec 10, 2021
65c4172
Handle nil autorequire results
seanmil Jan 11, 2022
56d6b94
Fix auto relationship spec tests for Windows
seanmil Jan 11, 2022
e54b31e
Merge pull request #22 from seanmil/tolerate_nil_autorequires
michaeltlombardi Jan 24, 2022
8c149e9
Add the ability to use `kind_of` matchers
binford2k Jul 20, 2022
72bb3a8
Merge pull request #24 from binford2k/check_return_type
pmcmaw Jul 21, 2022
67b4a06
(maint) - Release prep v2.12.0
pmcmaw Jul 21, 2022
735fdb0
Merge pull request #25 from pmcmaw/maint/main/release_prep_2_12_0
pmcmaw Jul 21, 2022
e69b483
(GH-CAT-98) - Adding CODEOWNERS file
pmcmaw Aug 24, 2022
1438d6d
Merge pull request #26 from pmcmaw/gh-cat-98/adding_codeowner
chelnak Sep 27, 2022
f646014
fixed plugins link
binford2k Oct 20, 2022
cd7d105
Merge pull request #30 from binford2k/plugin_page
chelnak Oct 21, 2022
8532f22
Merge pull request #31 from puppetlabs/master
pmcmaw Oct 21, 2022
f9f62f3
Update README.md
davidsandilands Nov 16, 2022
587617c
Merge pull request #33 from puppetlabs/davidsandilands-patch-1
jordanbreen28 Nov 16, 2022
2859228
Add a transitive test property
ekohl Mar 15, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
spec:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest"]
ruby:
- "2.5"
- "2.7"
puppet:
- '~> 6.0'
- '~> 7.0'
name: RSpec - ${{ matrix.os }} - Ruby ${{ matrix.ruby }} - Puppet ${{ matrix.puppet }}
runs-on: ${{ matrix.os }}
env:
COVERAGE: yes
PUPPET_GEM_VERSION: ${{ matrix.puppet }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake test

46 changes: 0 additions & 46 deletions .travis.yml

This file was deleted.

121 changes: 73 additions & 48 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@
All notable changes to this project will be documented in this file. This
project adheres to [Semantic Versioning](http://semver.org/).

## [2.12.0]

### Added
* Handle nil autorequire results ([#22](https://github.com/puppetlabs/rspec-puppet/pull/22))
* Add the ability to use kind_of matchers ([#24](https://github.com/puppetlabs/rspec-puppet/pull/24))

## [2.11.1]

### Fixed
* Ensure FacterImpl consistency between example groups ([#19](https://github.com/puppetlabs/rspec-puppet/pull/19))

## [2.11.0]

### Added
* Add setting to use custom Facter implementation ([GH-16](https://github.com/puppetlabs/rspec-puppet/pull/16))

## [2.10.0]
The release sees rspec-puppet move into the puppetlabs namespace

### Added
* Add ruby 3 support ([GH-11](https://github.com/puppetlabs/rspec-puppet/pull/11))

## [2.9.0]

### Added
Expand All @@ -15,8 +37,8 @@ project adheres to [Semantic Versioning](http://semver.org/).
### Breaking Changes
* As of the 2.8.0 release, the `rspec-puppet` project no longer guarantees compatibility
with Puppet 2.x or 3.x (running under Ruby 1.8.7) or Puppet 4.x (running under Ruby 1.9.3).
* This release adds support for the [`Sensitive`](https://puppet.com/docs/puppet/latest/lang_data_sensitive.html)
data type, however existing tests that were expecting `String` content may need to be updated
* This release adds support for the [`Sensitive`](https://puppet.com/docs/puppet/latest/lang_data_sensitive.html)
data type, however existing tests that were expecting `String` content may need to be updated
to wrap the expected value in the new `sensitive` helper:

```ruby
Expand All @@ -28,20 +50,20 @@ project adheres to [Semantic Versioning](http://semver.org/).
```

### Added
* Added support for [trusted external fact data](https://github.com/rodjek/rspec-puppet#specifying-trusted-external-data).
* Added the ability to exclude resources from the coverage report calculations using a regular expression.
* Added support for [trusted external fact data](https://github.com/puppetlabs/rspec-puppet#specifying-trusted-external-data).
* Added the ability to exclude resources from the coverage report calculations using a regular expression.
(See [documentation](https://rspec-puppet.com/documentation/coverage/#excluded-resources) for an example.
* Added `have_unique_values_for_all` matcher to assert a specific resource parameter value is unique across
the entire catalogue.
* Added `have_unique_values_for_all` matcher to assert a specific resource parameter value is unique across
the entire catalogue.
(See [documentation](https://rspec-puppet.com/documentation/classes/#test-resource-parameter-values-for-uniqueness).)
* Added ability to customize module-layer Hiera configuration via new settings. See
* Added ability to customize module-layer Hiera configuration via new settings. See
[documentation](https://rspec-puppet.com/documentation/configuration/#disable_module_hiera) for details.

### Changed
* `RSpec::Puppet::Cache` now evicts least recently used entries when it reaches max size.
* `rspec-puppet`'s implementation of `match_manifests` will no longer look in `init.pp` for class
* `rspec-puppet`'s implementation of `match_manifests` will no longer look in `init.pp` for class
declarations if a manifest file exactly matching the class name exists.

### Fixed
* Resolved compatibility issues with Ruby 2.7.x and added Ruby 2.7.x to the test matrix.
* Resolved issues calculating coverage and reporting results when there are 0 tested resources.
Expand Down Expand Up @@ -554,42 +576,45 @@ Thanks to Adrien Thebo, Alex Harvey, Brian, Dan Bode, Dominic Cleal, Javier Pala
## 1.0.1 and earlier
For changelog of versions 1.0.1 and earlier, see http://rspec-puppet.com/changelog/

[2.x]: https://github.com/rodjek/rspec-puppet/compare/v2.9.0...master
[2.9.0]: https://github.com/rodjek/rspec-puppet/compare/v2.8.0...v2.9.0
[2.8.0]: https://github.com/rodjek/rspec-puppet/compare/v2.7.10...v2.8.0
[2.7.10]: https://github.com/rodjek/rspec-puppet/compare/v2.7.9...v2.7.10
[2.7.9]: https://github.com/rodjek/rspec-puppet/compare/v2.7.8...v2.7.9
[2.7.8]: https://github.com/rodjek/rspec-puppet/compare/v2.7.7...v2.7.8
[2.7.7]: https://github.com/rodjek/rspec-puppet/compare/v2.7.6...v2.7.7
[2.7.6]: https://github.com/rodjek/rspec-puppet/compare/v2.7.5...v2.7.6
[2.7.5]: https://github.com/rodjek/rspec-puppet/compare/v2.7.4...v2.7.5
[2.7.4]: https://github.com/rodjek/rspec-puppet/compare/v2.7.3...v2.7.4
[2.7.3]: https://github.com/rodjek/rspec-puppet/compare/v2.7.2...v2.7.3
[2.7.2]: https://github.com/rodjek/rspec-puppet/compare/v2.7.1...v2.7.2
[2.7.1]: https://github.com/rodjek/rspec-puppet/compare/v2.7.0...v2.7.1
[2.7.0]: https://github.com/rodjek/rspec-puppet/compare/v2.6.15...v2.7.0
[2.6.15]: https://github.com/rodjek/rspec-puppet/compare/v2.6.14...v2.6.15
[2.6.14]: https://github.com/rodjek/rspec-puppet/compare/v2.6.13...v2.6.14
[2.6.13]: https://github.com/rodjek/rspec-puppet/compare/v2.6.12...v2.6.13
[2.6.12]: https://github.com/rodjek/rspec-puppet/compare/v2.6.11...v2.6.12
[2.6.11]: https://github.com/rodjek/rspec-puppet/compare/v2.6.10...v2.6.11
[2.6.10]: https://github.com/rodjek/rspec-puppet/compare/v2.6.9...v2.6.10
[2.6.9]: https://github.com/rodjek/rspec-puppet/compare/v2.6.8...v2.6.9
[2.6.8]: https://github.com/rodjek/rspec-puppet/compare/v2.6.7...v2.6.8
[2.6.7]: https://github.com/rodjek/rspec-puppet/compare/v2.6.6...v2.6.7
[2.6.6]: https://github.com/rodjek/rspec-puppet/compare/v2.6.5...v2.6.6
[2.6.5]: https://github.com/rodjek/rspec-puppet/compare/v2.6.4...v2.6.5
[2.6.4]: https://github.com/rodjek/rspec-puppet/compare/v2.6.3...v2.6.4
[2.6.3]: https://github.com/rodjek/rspec-puppet/compare/v2.6.2...v2.6.3
[2.6.2]: https://github.com/rodjek/rspec-puppet/compare/v2.6.1...v2.6.2
[2.6.1]: https://github.com/rodjek/rspec-puppet/compare/v2.6.0...v2.6.1
[2.6.0]: https://github.com/rodjek/rspec-puppet/compare/2.5.0...v2.6.0
[2.5.0]: https://github.com/rodjek/rspec-puppet/compare/v2.4.0...v2.5.0
[2.4.0]: https://github.com/rodjek/rspec-puppet/compare/v2.3.2...v2.4.0
[2.3.2]: https://github.com/rodjek/rspec-puppet/compare/v2.3.1...v2.3.2
[2.3.1]: https://github.com/rodjek/rspec-puppet/compare/v2.3.0...v2.3.1
[2.3.0]: https://github.com/rodjek/rspec-puppet/compare/v2.2.0...v2.3.0
[2.2.0]: https://github.com/rodjek/rspec-puppet/compare/v2.1.0...v2.2.0
[2.1.0]: https://github.com/rodjek/rspec-puppet/compare/v2.0.1...v2.1.0
[2.0.1]: https://github.com/rodjek/rspec-puppet/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/rodjek/rspec-puppet/compare/v1.0.1...v2.0.0
[2.x]: https://github.com/puppetlabs/rspec-puppet/compare/v2.11.1...master
[2.11.1]: https://github.com/puppetlabs/rspec-puppet/compare/v2.11.0..v2.11.1
[2.11.0]: https://github.com/puppetlabs/rspec-puppet/compare/v2.10.0...v2.11.0
[2.10.0]: https://github.com/puppetlabs/rspec-puppet/compare/v2.9.0...v2.10.0
[2.9.0]: https://github.com/puppetlabs/rspec-puppet/compare/v2.8.0...v2.9.0
[2.8.0]: https://github.com/puppetlabs/rspec-puppet/compare/v2.7.10...v2.8.0
[2.7.10]: https://github.com/puppetlabs/rspec-puppet/compare/v2.7.9...v2.7.10
[2.7.9]: https://github.com/puppetlabs/rspec-puppet/compare/v2.7.8...v2.7.9
[2.7.8]: https://github.com/puppetlabs/rspec-puppet/compare/v2.7.7...v2.7.8
[2.7.7]: https://github.com/puppetlabs/rspec-puppet/compare/v2.7.6...v2.7.7
[2.7.6]: https://github.com/puppetlabs/rspec-puppet/compare/v2.7.5...v2.7.6
[2.7.5]: https://github.com/puppetlabs/rspec-puppet/compare/v2.7.4...v2.7.5
[2.7.4]: https://github.com/puppetlabs/rspec-puppet/compare/v2.7.3...v2.7.4
[2.7.3]: https://github.com/puppetlabs/rspec-puppet/compare/v2.7.2...v2.7.3
[2.7.2]: https://github.com/puppetlabs/rspec-puppet/compare/v2.7.1...v2.7.2
[2.7.1]: https://github.com/puppetlabs/rspec-puppet/compare/v2.7.0...v2.7.1
[2.7.0]: https://github.com/puppetlabs/rspec-puppet/compare/v2.6.15...v2.7.0
[2.6.15]: https://github.com/puppetlabs/rspec-puppet/compare/v2.6.14...v2.6.15
[2.6.14]: https://github.com/puppetlabs/rspec-puppet/compare/v2.6.13...v2.6.14
[2.6.13]: https://github.com/puppetlabs/rspec-puppet/compare/v2.6.12...v2.6.13
[2.6.12]: https://github.com/puppetlabs/rspec-puppet/compare/v2.6.11...v2.6.12
[2.6.11]: https://github.com/puppetlabs/rspec-puppet/compare/v2.6.10...v2.6.11
[2.6.10]: https://github.com/puppetlabs/rspec-puppet/compare/v2.6.9...v2.6.10
[2.6.9]: https://github.com/puppetlabs/rspec-puppet/compare/v2.6.8...v2.6.9
[2.6.8]: https://github.com/puppetlabs/rspec-puppet/compare/v2.6.7...v2.6.8
[2.6.7]: https://github.com/puppetlabs/rspec-puppet/compare/v2.6.6...v2.6.7
[2.6.6]: https://github.com/puppetlabs/rspec-puppet/compare/v2.6.5...v2.6.6
[2.6.5]: https://github.com/puppetlabs/rspec-puppet/compare/v2.6.4...v2.6.5
[2.6.4]: https://github.com/puppetlabs/rspec-puppet/compare/v2.6.3...v2.6.4
[2.6.3]: https://github.com/puppetlabs/rspec-puppet/compare/v2.6.2...v2.6.3
[2.6.2]: https://github.com/puppetlabs/rspec-puppet/compare/v2.6.1...v2.6.2
[2.6.1]: https://github.com/puppetlabs/rspec-puppet/compare/v2.6.0...v2.6.1
[2.6.0]: https://github.com/puppetlabs/rspec-puppet/compare/2.5.0...v2.6.0
[2.5.0]: https://github.com/puppetlabs/rspec-puppet/compare/v2.4.0...v2.5.0
[2.4.0]: https://github.com/puppetlabs/rspec-puppet/compare/v2.3.2...v2.4.0
[2.3.2]: https://github.com/puppetlabs/rspec-puppet/compare/v2.3.1...v2.3.2
[2.3.1]: https://github.com/puppetlabs/rspec-puppet/compare/v2.3.0...v2.3.1
[2.3.0]: https://github.com/puppetlabs/rspec-puppet/compare/v2.2.0...v2.3.0
[2.2.0]: https://github.com/puppetlabs/rspec-puppet/compare/v2.1.0...v2.2.0
[2.1.0]: https://github.com/puppetlabs/rspec-puppet/compare/v2.0.1...v2.1.0
[2.0.1]: https://github.com/puppetlabs/rspec-puppet/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/puppetlabs/rspec-puppet/compare/v1.0.1...v2.0.0
2 changes: 2 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Setting ownership to the modules team
* @puppetlabs/modules
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,20 @@ In some circumstances (e.g. where your nodename/certname is not the same as
your FQDN), this behaviour is undesirable and can be disabled by changing this
setting to `false`.

#### facter\_implementation
Type | Default | Puppet Version(s)
------- | -------- | -----------------
String | `facter` | 6.25+, 7.12+

Configures rspec-puppet to use a specific Facter implementation for running
unit tests. If the `rspec` implementation is set and Puppet does not support
it, rspec-puppet will warn and fall back to the `facter` implementation.
Setting an unsupported option will make rspec-puppet raise an error.

* `facter` - Use the default implementation, honoring the Facter version specified in the Gemfile
* `rspec` - Use a custom hash-based implementation of Facter defined in
rspec-puppet (this provides a considerable gain in speed if tests are run with Facter 4)

## Naming conventions

For clarity and consistency, I recommend that you use the following directory
Expand Down Expand Up @@ -603,6 +617,11 @@ be translated to `undef` when compiling. For example:
let(:params) { {'user' => :undef, ...} }
```

For passing a sensitive value you can use the sensitive function with a value in brackets. For example
```ruby
let(:params) { {'password' =>sensitive('secret') } }
```

For references to nodes or resources as seen when using `require` or `before` properties,
or an `application` resource you can pass the string as an argument to the `ref` helper:

Expand Down Expand Up @@ -1101,4 +1120,5 @@ be excluded from the coverage report.
* [rspec-puppet-osmash](https://github.com/Aethylred/rspec-puppet-osmash): Provides Operation System hashes and validations for rspec-puppet
* [puppet_spec_facts](https://github.com/danieldreier/puppet_spec_facts): Gem to provide puppet fact hashes for rspec-puppet testing

For a list of other module development tools see https://puppet.community/plugins/
For a list of other module development tools see https://voxpupuli.org/plugins/

47 changes: 0 additions & 47 deletions appveyor.yml

This file was deleted.

Loading