-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Accept Datatype Sensitive for all Secrets
- accept Datatype Sensitive for Puppet-Type foreman_config_entry - accept Datatype Sensitive for CLI-Password - accept Datatype Sensitive for initial Admin-Password - accept Datatype Sensitive for Database-Password - accept Datatype Sensitive for OAuth-Secrets - accept Datatype Sensitive for SMTP-Secrets
- Loading branch information
Showing
9 changed files
with
50 additions
and
20 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
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
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
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 |
---|---|---|
@@ -1,13 +1,27 @@ | ||
require 'spec_helper' | ||
|
||
describe 'foreman::plugin::supervisory_authority' do | ||
let(:params) do | ||
{ | ||
'server_url' => 'https://example.com', | ||
'secret_token' => 'secret_example', | ||
'service_name' => 'foreman prod', | ||
} | ||
context 'with Standard-Parameters' do | ||
let(:params) do | ||
{ | ||
'server_url' => 'https://example.com', | ||
'secret_token' => 'secret_example', | ||
'service_name' => 'foreman prod', | ||
} | ||
end | ||
include_examples 'basic foreman plugin tests', 'supervisory_authority' | ||
it { is_expected.to contain_foreman__plugin('supervisory_authority').with_config(%r{^---\n:foreman_supervisory_authority:\n server_url: https://example\.com\n}) } | ||
end | ||
|
||
context 'with Sensitive secret_token' do | ||
let(:params) do | ||
{ | ||
'server_url' => 'https://example.com', | ||
'secret_token' => sensitive('secret_example'), | ||
'service_name' => 'foreman prod', | ||
} | ||
end | ||
include_examples 'basic foreman plugin tests', 'supervisory_authority' | ||
it { is_expected.to contain_foreman__plugin('supervisory_authority').with_config(%r{^---\n:foreman_supervisory_authority:\n server_url: https://example\.com\n}) } | ||
end | ||
include_examples 'basic foreman plugin tests', 'supervisory_authority' | ||
it { is_expected.to contain_foreman__plugin('supervisory_authority').with_config(%r{^---\n:foreman_supervisory_authority:\n server_url: https://example\.com\n}) } | ||
end |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<%- | | ||
Optional[String] $username, | ||
Optional[String] $password, | ||
Optional[Variant[String, Sensitive[String]]] $password, | ||
| -%> | ||
:foreman: | ||
# Credentials. You'll be asked for the interactively if you leave them blank here | ||
:username: '<%= $username %>' | ||
:password: '<%= $password %>' | ||
:username:<%= if $username { " '${username}'" } %> | ||
:password:<%= if $password { " '${password}'" } %> |