Merge "Remove password hash generation in each puppet modules"

This commit is contained in:
Zuul
2020-05-20 04:43:21 +00:00
committed by Gerrit Code Review
5 changed files with 20 additions and 21 deletions

View File

@@ -49,7 +49,7 @@ class mistral::db::mysql(
::openstacklib::db::mysql { 'mistral':
user => $user,
password_hash => mysql::password($password),
password => $password,
dbname => $dbname,
host => $host,
charset => $charset,

View File

@@ -35,11 +35,11 @@ class mistral::db::postgresql(
include mistral::deps
::openstacklib::db::postgresql { 'mistral':
password_hash => postgresql_password($user, $password),
dbname => $dbname,
user => $user,
encoding => $encoding,
privileges => $privileges,
password => $password,
dbname => $dbname,
user => $user,
encoding => $encoding,
privileges => $privileges,
}
Anchor['mistral::db::begin']

View File

@@ -13,10 +13,6 @@
"name": "puppetlabs/stdlib",
"version_requirement": ">=5.0.0 <7.0.0"
},
{
"name": "puppetlabs/mysql",
"version_requirement": ">=6.0.0 <11.0.0"
},
{
"name": "openstack/keystone",
"version_requirement": ">=17.0.0 <18.0.0"

View File

@@ -7,19 +7,19 @@ describe 'mistral::db::mysql' do
let :params do
{
:password => 'fooboozoo_default_password',
:password => 'mistralpass',
}
end
shared_examples 'mistral::db::mysql' do
context 'with only required params' do
it { should contain_openstacklib__db__mysql('mistral').with(
:user => 'mistral',
:password_hash => '*3DDF34A86854A312A8E2C65B506E21C91800D206',
:dbname => 'mistral',
:host => '127.0.0.1',
:charset => 'utf8',
:collate => 'utf8_general_ci',
:user => 'mistral',
:password => 'mistralpass',
:dbname => 'mistral',
:host => '127.0.0.1',
:charset => 'utf8',
:collate => 'utf8_general_ci',
)}
end

View File

@@ -4,7 +4,7 @@ describe 'mistral::db::postgresql' do
shared_examples_for 'mistral::db::postgresql' do
let :req_params do
{ :password => 'pw' }
{ :password => 'mistralpass' }
end
let :pre_condition do
@@ -16,9 +16,12 @@ describe 'mistral::db::postgresql' do
req_params
end
it { is_expected.to contain_postgresql__server__db('mistral').with(
:user => 'mistral',
:password => 'md56cc4a9db977897a441d3a498a5d94fce'
it { is_expected.to contain_openstacklib__db__postgresql('mistral').with(
:user => 'mistral',
:password => 'mistralpass',
:dbname => 'mistral',
:encoding => nil,
:privileges => 'ALL',
)}
end