Merge "Use validate_legacy"
This commit is contained in:
commit
081afba5e0
|
@ -136,8 +136,8 @@ define oslo::db(
|
|||
|
||||
if !is_service_default($connection) {
|
||||
|
||||
validate_re($connection,
|
||||
'^(sqlite|mysql(\+pymysql)?|postgresql(\+psycopg2)?|mongodb):\/\/(\S+:\S+@\S+\/\S+)?')
|
||||
validate_legacy(Oslo::Dbconn, 'validate_re', $connection,
|
||||
['^(sqlite|mysql(\+pymysql)?|postgresql(\+psycopg2)?|mongodb):\/\/(\S+:\S+@\S+\/\S+)?'])
|
||||
|
||||
if $manage_backend_package {
|
||||
case $connection {
|
||||
|
|
|
@ -137,7 +137,7 @@ define oslo::log(
|
|||
if is_service_default($default_log_levels) {
|
||||
$default_log_levels_real = $default_log_levels
|
||||
} else {
|
||||
validate_hash($default_log_levels)
|
||||
validate_legacy(Hash, 'validate_hash', $default_log_levels)
|
||||
$default_log_levels_real = join(sort(join_keys_to_values($default_log_levels, '=')), ',')
|
||||
}
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ describe 'oslo::db' do
|
|||
{ :connection => 'foo://db:db@localhost/db', }
|
||||
end
|
||||
|
||||
it_raises 'a Puppet::Error', /validate_re/
|
||||
it { should raise_error(Puppet::Error) }
|
||||
end
|
||||
|
||||
context 'with incorrect pymysql database_connection string' do
|
||||
|
@ -165,7 +165,7 @@ describe 'oslo::db' do
|
|||
{ :connection => 'foo+pymysql://db:db@localhost/db', }
|
||||
end
|
||||
|
||||
it_raises 'a Puppet::Error', /validate_re/
|
||||
it { should raise_error(Puppet::Error) }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue