3 describe 'nova::db::mysql' do
6 'include mysql::server'
9 let :required_params do
10 { :password => "qwerty" }
13 context 'on a Debian osfamily' do
15 { :osfamily => "Debian" }
18 context 'with only required parameters' do
23 it { should contain_openstacklib__db__mysql('nova').with(
25 :password_hash => '*AA1420F182E88B9E5F874F6FBE7459291E8F4601',
27 :collate => 'utf8_general_ci',
31 context 'when overriding charset' do
33 { :charset => 'latin1' }.merge(required_params)
36 it { should contain_openstacklib__db__mysql('nova').with_charset(params[:charset]) }
40 context 'on a RedHat osfamily' do
42 { :osfamily => 'RedHat' }
45 context 'with only required parameters' do
50 it { should contain_openstacklib__db__mysql('nova').with(
52 :password_hash => '*AA1420F182E88B9E5F874F6FBE7459291E8F4601',
54 :collate => 'utf8_general_ci',
58 context 'when overriding charset' do
60 { :charset => 'latin1' }.merge(required_params)
63 it { should contain_openstacklib__db__mysql('nova').with_charset(params[:charset]) }
67 describe "overriding allowed_hosts param to array" do
69 { :osfamily => "Debian" }
73 :password => 'novapass',
74 :allowed_hosts => ['127.0.0.1','%']
80 describe "overriding allowed_hosts param to string" do
82 { :osfamily => 'RedHat' }
86 :password => 'novapass2',
87 :allowed_hosts => '192.168.1.1'
93 describe "overriding allowed_hosts param equals to host param " do
95 { :osfamily => 'RedHat' }
99 :password => 'novapass2',
100 :allowed_hosts => '127.0.0.1'