]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/openstacklib/spec/acceptance/mysql_spec.rb
try with modules from master
[dsa-puppet.git] / 3rdparty / modules / openstacklib / spec / acceptance / mysql_spec.rb
1 require 'spec_helper_acceptance'
2
3 describe 'openstacklib mysql' do
4
5   context 'default parameters' do
6
7     it 'should work with no errors' do
8       pp= <<-EOS
9       Exec { logoutput => 'on_failure' }
10
11       class { '::mysql::server': }
12
13       ::openstacklib::db::mysql { 'beaker':
14         password_hash => mysql_password('keystone'),
15         allowed_hosts => '127.0.0.1',
16       }
17       EOS
18
19       # Run it twice and test for idempotency
20       apply_manifest(pp, :catch_failures => true)
21       apply_manifest(pp, :catch_changes => true)
22     end
23
24     describe port(3306) do
25       it { is_expected.to be_listening.with('tcp') }
26     end
27
28     describe 'test database listing' do
29       it 'should list beaker database' do
30         expect(shell("mysql -e 'show databases;'|grep -q beaker").exit_code).to be_zero
31       end
32     end
33
34   end
35 end