-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #515 from traylenator/deferredcomplex
Support rich datatypes and deferred password values
- Loading branch information
Showing
2 changed files
with
155 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper_acceptance' | ||
|
||
describe 'redis with deferred password' do | ||
include_examples 'an idempotent resource' do | ||
let(:manifest) do | ||
<<-PUPPET | ||
class { 'redis': | ||
manage_repo => true, | ||
redis_apt_repo => true, | ||
port => 10001, | ||
requirepass => Deferred('inline_epp',['<%= $pass %>',{'pass' => 'topsecret'}]), | ||
} | ||
PUPPET | ||
end | ||
end | ||
|
||
describe command('redis-cli -p 10001 -a topsecret ping') do | ||
its(:exit_status) { is_expected.to eq 0 } | ||
its(:stdout) { is_expected.to match %r{PONG} } | ||
end | ||
|
||
describe command('redis-cli -p 10001 -a nonsense ping') do | ||
its(:stdout) { is_expected.not_to match %r{PONG} } | ||
end | ||
end |