Skip to content

Commit 421e3d1

Browse files
committed
add accept test
1 parent 0e20673 commit 421e3d1

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

manifests/instance.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@
608608

609609
# TODO: Rely on https://github.com/puppetlabs/puppetlabs-stdlib/pull/1425
610610
# once available.
611-
if $_template_params.any |$value| { $value.is_a(Deferred) } {
611+
if $_template_params.any |$_key, $_value| { $_value.is_a(Deferred) } {
612612
$_template_params_escaped = $_template_params.map | $_var , $_value | {
613613
if $_value.is_a(Deferred) {
614614
{ $_var => "<%= \$${_var} %>" }
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# frozen_string_literal: true
2+
3+
require 'spec_helper_acceptance'
4+
5+
describe 'redis with deferred password' do
6+
it 'configures and work with no errors' do
7+
pp = <<-EOS
8+
class { 'redis':
9+
manage_repo => true,
10+
redis_apt_repo => true,
11+
port => 10001,
12+
masterauth => Deferred('inline_epp',['<%= $pass %>\n',{'pass' => 'topsecret'}]),
13+
}
14+
EOS
15+
16+
apply_manifest(pp, catch_failures: true, debug: true)
17+
apply_manifest(pp, catch_changes: true, debug: true)
18+
end
19+
20+
describe command('redis-cli -p 10001 -a topsecret ping') do
21+
its(:stdout) { is_expected.to match %r{PONG} }
22+
end
23+
end

0 commit comments

Comments
 (0)