Skip to content

Commit 3576c2e

Browse files
authored
Merge pull request #45 from Dan33l/doc_sensitive
doc : add information about sensitive helper
2 parents 6927735 + b0eaff9 commit 3576c2e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/_includes/catalogue_matchers.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@ undefined parameters at once by chaining the `without` method to the
126126
it { is_expected.to contain_service('apache').without(['restart', 'status']) }
127127
{% endhighlight %}
128128

129+
It can be tested that a Sensitive value of resource parameter passed to template is present as expected.
130+
131+
{% highlight ruby %}
132+
it { is_expected.to contain_file('/etc/mysecret.conf').with_content(sensitive(%r{^Token==MySecretTokenValue$})) }
133+
{% endhighlight %}
134+
129135
### Test resource parameter values for uniqueness
130136

131137
Use the `have_unique_values_for_all` matcher to test a specific resource parameter

0 commit comments

Comments
 (0)