Allow override of mysql charset & small whitespace fixes and spec improvements to test this change.
This commit is contained in:
parent
cbd1a0d43f
commit
a7dedf197a
@ -4,11 +4,12 @@
|
||||
#
|
||||
class glance::db::mysql(
|
||||
$password,
|
||||
$dbname = 'glance',
|
||||
$user = 'glance',
|
||||
$host = '127.0.0.1',
|
||||
$dbname = 'glance',
|
||||
$user = 'glance',
|
||||
$host = '127.0.0.1',
|
||||
$allowed_hosts = undef,
|
||||
$cluster_id = 'localzone'
|
||||
$charset = 'latin1',
|
||||
$cluster_id = 'localzone'
|
||||
) {
|
||||
|
||||
Class['glance::db::mysql'] -> Exec<| title == 'glance-manage db_sync' |>
|
||||
@ -20,7 +21,7 @@ class glance::db::mysql(
|
||||
user => $user,
|
||||
password => $password,
|
||||
host => $host,
|
||||
charset => 'latin1',
|
||||
charset => $charset,
|
||||
# I may want to inject some sql
|
||||
require => Class['mysql::config'],
|
||||
}
|
||||
|
@ -18,7 +18,24 @@ describe 'glance::db::mysql' do
|
||||
|
||||
it { should contain_mysql__db('glance').with(
|
||||
:password => 'glancepass1',
|
||||
:require => 'Class[Mysql::Config]'
|
||||
:require => 'Class[Mysql::Config]',
|
||||
:charset => 'latin1'
|
||||
)}
|
||||
|
||||
end
|
||||
|
||||
describe "overriding default params" do
|
||||
let :params do
|
||||
{
|
||||
:password => 'glancepass2',
|
||||
:dbname => 'glancedb2',
|
||||
:charset => 'utf8'
|
||||
}
|
||||
end
|
||||
|
||||
it { should contain_mysql__db('glancedb2').with(
|
||||
:password => 'glancepass2',
|
||||
:charset => 'utf8'
|
||||
)}
|
||||
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user