Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix test failures

The tests were failing b/c they assume a hash would
be processed in order.

The tests have been updated to check the expected keys
individually.
  • Loading branch information...
commit ad142c3ee3a44505a50524ea8ec2e77cebf2602e 1 parent 6f76b4f
@bodepd authored
Showing with 12 additions and 10 deletions.
  1. +12 −10 spec/classes/openstack_controller_spec.rb
View
22 spec/classes/openstack_controller_spec.rb
@@ -62,11 +62,12 @@
)
end
- it { should contain_class('mysql::server').with(
- :config_hash => {'bind_address' => '0.0.0.0', 'root_password' => 'sql_pass' },
- :enabled => true
- )
- }
+ it 'should configure mysql server' do
+ param_value(subject, 'class', 'mysql::server', 'enabled').should be_true
+ config_hash = param_value(subject, 'class', 'mysql::server', 'config_hash')
+ config_hash['bind_address'].should == '0.0.0.0'
+ config_hash['root_password'].should == 'sql_pass'
+ end
it 'should contain openstack db config' do
should contain_class('keystone::db::mysql').with(
@@ -129,11 +130,12 @@
)
end
- it { should contain_class('mysql::server').with(
- :config_hash => {'bind_address' => '0.0.0.0', 'root_password' => 'sql_pass' },
- :enabled => false
- )
- }
+ it 'should configure mysql server' do
+ param_value(subject, 'class', 'mysql::server', 'enabled').should be_false
+ config_hash = param_value(subject, 'class', 'mysql::server', 'config_hash')
+ config_hash['bind_address'].should == '0.0.0.0'
+ config_hash['root_password'].should == 'sql_pass'
+ end
['keystone', 'nova', 'glance', 'cinder', 'quantum'].each do |x|
it { should_not contain_class("#{x}::db::mysql") }

0 comments on commit ad142c3

Please sign in to comment.
Something went wrong with that request. Please try again.