Skip to content

Commit bd93dba

Browse files
author
sanfrancrisko
authored
Merge pull request #281 from puppetlabs/dependabot/bundler/puppetlabs_spec_helper-tw-3.0
Update puppetlabs_spec_helper requirement from ~> 2.7 to ~> 3.0
2 parents 7375f33 + 8cd54fe commit bd93dba

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ group :tests do
1111
gem 'simplecov-console'
1212

1313
# the test gems required for module testing
14-
gem 'puppetlabs_spec_helper', '~> 2.7'
14+
gem 'puppetlabs_spec_helper', '~> 3.0'
1515
gem 'rspec-puppet'
1616

1717
# since the Resource API runs inside the puppetserver, test against the JRuby versions we ship

spec/acceptance/sensitive_spec.rb

+11-11
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,31 @@
88

99
describe 'using `puppet apply`' do
1010
it 'is not exposed by notify' do
11-
stdout_str, _status = Open3.capture2e("puppet apply #{common_args} -e \"notice(Sensitive('foo'))\"")
11+
stdout_str, _status = Open3.capture2e("puppet apply #{common_args} -e \"notice(Sensitive('sesitive_data'))\"")
1212
expect(stdout_str).to match %r{redacted}
13-
expect(stdout_str).not_to match %r{foo}
13+
expect(stdout_str).not_to match %r{sesitive_data}
1414
expect(stdout_str).not_to match %r{warn|error}i
1515
end
1616

1717
it 'is not exposed by a provider' do
18-
stdout_str, _status = Open3.capture2e("puppet apply #{common_args} -e \"test_sensitive { bar: secret => Sensitive('foo'), "\
19-
"optional_secret => Sensitive('optional foo'), array_secret => [Sensitive('array foo')] }\"")
18+
stdout_str, _status = Open3.capture2e("puppet apply #{common_args} -e \"test_sensitive { test_resource: secret => Sensitive('sesitive_data'), "\
19+
"optional_secret => Sensitive('optional sesitive_data'), array_secret => [Sensitive('array sesitive_data')] }\"")
2020
expect(stdout_str).to match %r{redacted}
21-
expect(stdout_str).not_to match %r{foo}
21+
expect(stdout_str).not_to match %r{sesitive_data}
2222
expect(stdout_str).not_to match %r{warn|error}i
2323
end
2424

2525
context 'when a sensitive value is not the top level type' do
2626
it 'is not exposed by a provider' do
27-
stdout_str, _status = Open3.capture2e("puppet apply #{common_args} -e \"test_sensitive { bar: secret => Sensitive('foo'), "\
28-
"optional_secret => Sensitive('optional foo'), variant_secret => [Sensitive('variant foo')] }\"")
27+
stdout_str, _status = Open3.capture2e("puppet apply #{common_args} -e \"test_sensitive { test_resource: secret => Sensitive('sesitive_data'), "\
28+
"optional_secret => Sensitive('optional sesitive_data'), variant_secret => [Sensitive('variant sesitive_data')] }\"")
2929
expect(stdout_str).to match %r{redacted}
30-
expect(stdout_str).not_to match %r{variant foo}
30+
expect(stdout_str).not_to match %r{variant sesitive_data}
3131
expect(stdout_str).not_to match %r{warn|error}i
3232
end
3333
it 'properly validates the sensitive type value' do
34-
stdout_str, _status = Open3.capture2e("puppet apply #{common_args} -e \"test_sensitive { bar: secret => Sensitive('foo'), "\
35-
"optional_secret => Sensitive('optional foo'), variant_secret => [Sensitive(134679)] }\"")
34+
stdout_str, _status = Open3.capture2e("puppet apply #{common_args} -e \"test_sensitive { test_resource: secret => Sensitive('sesitive_data'), "\
35+
"optional_secret => Sensitive('optional sesitive_data'), variant_secret => [Sensitive(134679)] }\"")
3636
expect(stdout_str).to match %r{Sensitive\[String\]( value)?, got Sensitive\[Integer\]}
3737
expect(stdout_str).not_to match %r{134679}
3838
end
@@ -43,7 +43,7 @@
4343
it 'is not exposed in the output' do
4444
stdout_str, _status = Open3.capture2e("puppet resource #{common_args} test_sensitive")
4545
expect(stdout_str).to match %r{redacted}
46-
expect(stdout_str).not_to match %r{(foo|bar)secret}
46+
expect(stdout_str).not_to match %r{(sesitive_data|test_resource)secret}
4747
expect(stdout_str).not_to match %r{warn|error}i
4848
end
4949
end

0 commit comments

Comments
 (0)