Default to utf8 for MySQL
Change default charset to utf8 and default collation order to utf8_unicode_ci to align with upstream defaults. Change-Id: I2aa59fd868476f599019e3029af36aa707139fe1 Closes-Bug: #1302088
This commit is contained in:
@@ -21,11 +21,11 @@
|
||||
#
|
||||
# [*charset*]
|
||||
# (optional) The charset to use for the nova database
|
||||
# Defaults to 'latin1'
|
||||
# Defaults to 'utf8'
|
||||
#
|
||||
# [*collate*]
|
||||
# (optional) The collate to use for the nova database
|
||||
# Defaults to 'latin1_swedish_ci'
|
||||
# Defaults to 'utf8_unicode_ci'
|
||||
#
|
||||
# [*allowed_hosts*]
|
||||
# (optional) Additional hosts that are allowed to access this DB
|
||||
@@ -45,8 +45,8 @@ class nova::db::mysql(
|
||||
$dbname = 'nova',
|
||||
$user = 'nova',
|
||||
$host = '127.0.0.1',
|
||||
$charset = 'latin1',
|
||||
$collate = 'latin1_swedish_ci',
|
||||
$charset = 'utf8',
|
||||
$collate = 'utf8_unicode_ci',
|
||||
$allowed_hosts = undef,
|
||||
$mysql_module = '0.9',
|
||||
$cluster_id = undef
|
||||
|
@@ -23,14 +23,14 @@ describe 'nova::db::mysql' do
|
||||
it { should contain_mysql__db('nova').with(
|
||||
:user => 'nova',
|
||||
:password => 'qwerty',
|
||||
:charset => 'latin1',
|
||||
:charset => 'utf8',
|
||||
:require => "Class[Mysql::Config]"
|
||||
)}
|
||||
end
|
||||
|
||||
context 'when overriding charset' do
|
||||
let :params do
|
||||
{ :charset => 'utf8' }.merge(required_params)
|
||||
{ :charset => 'latin1' }.merge(required_params)
|
||||
end
|
||||
|
||||
it { should contain_mysql__db('nova').with_charset(params[:charset]) }
|
||||
@@ -50,14 +50,14 @@ describe 'nova::db::mysql' do
|
||||
it { should contain_mysql__db('nova').with(
|
||||
:user => 'nova',
|
||||
:password => 'qwerty',
|
||||
:charset => 'latin1',
|
||||
:charset => 'utf8',
|
||||
:require => "Class[Mysql::Config]"
|
||||
)}
|
||||
end
|
||||
|
||||
context 'when overriding charset' do
|
||||
let :params do
|
||||
{ :charset => 'utf8' }.merge(required_params)
|
||||
{ :charset => 'latin1' }.merge(required_params)
|
||||
end
|
||||
|
||||
it { should contain_mysql__db('nova').with_charset(params[:charset]) }
|
||||
|
Reference in New Issue
Block a user