3 describe 'openstacklib::db::mysql::host_access' do
6 "include mysql::server\n" +
7 "openstacklib::db::mysql { 'nova':\n" +
8 " password_hash => 'AA1420F182E88B9E5F874F6FBE7459291E8F4601'}"
11 shared_examples 'openstacklib::db::mysql::host_access examples' do
13 context 'with required parameters' do
14 let (:title) { 'nova_10.0.0.1' }
17 :password_hash => 'AA1420F182E88B9E5F874F6FBE7459291E8F4601',
19 :privileges => 'ALL' }
22 it { is_expected.to contain_mysql_user("#{params[:user]}@10.0.0.1").with(
23 :password_hash => params[:password_hash]
26 it { is_expected.to contain_mysql_grant("#{params[:user]}@10.0.0.1/#{params[:database]}.*").with(
27 :user => "#{params[:user]}@10.0.0.1",
29 :table => "#{params[:database]}.*"
35 context 'on a Debian osfamily' do
37 { :osfamily => "Debian" }
40 include_examples 'openstacklib::db::mysql::host_access examples'
43 context 'on a RedHat osfamily' do
45 { :osfamily => 'RedHat' }
48 include_examples 'openstacklib::db::mysql::host_access examples'