Make creation of nova database dependant on mysql::config instead of mysql::server, database isn't fully configured until this has been run.

This commit is contained in:
John Chilton 2012-05-15 13:34:10 -05:00
parent 03c6ddb013
commit bd80998818
2 changed files with 17 additions and 1 deletions

View File

@ -20,7 +20,7 @@ class nova::db::mysql(
password => $password,
host => $host,
# I may want to inject some sql
require => Class['mysql::server'],
require => Class['mysql::config'],
}
if $allowed_hosts {

View File

@ -0,0 +1,16 @@
require 'spec_helper'
describe 'nova::db::mysql' do
let :facts do
{ :osfamily => "Debian" }
end
let :params do
{ :password => "qwerty" }
end
it { should contain_mysql__db('nova').with(
:user => 'nova',
:password => 'qwerty',
:require => "Class[Mysql::Config]"
)}
end