Skip to content

Commit f3b3a7e

Browse files
author
Marius Bakke
committed
fix database_user tests after changing creation method
1 parent dc2ec81 commit f3b3a7e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

spec/unit/puppet/provider/database_user/mysql_spec.rb

+6-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626
before :each do
2727
# password hash = mypass
2828
@resource = Puppet::Type::Database_user.new(
29-
{ :password_hash => '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4', :name => 'joe@localhost' }
29+
{ :password_hash => '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4',
30+
:name => 'joe@localhost',
31+
:max_user_connections => '10'
32+
}
3033
)
3134
@provider = provider_class.new(@resource)
3235
Facter.stubs(:value).with(:root_home).returns(root_home)
@@ -46,7 +49,8 @@
4649

4750
describe 'create' do
4851
it 'makes a user' do
49-
subject.expects(:mysql).with([defaults_file, 'mysql', '-e', "create user 'joe'@'localhost' identified by PASSWORD '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4'"])
52+
subject.expects(:mysql).with([defaults_file, 'mysql', '-e', "grant usage on *.* to 'joe'@'localhost' identified by PASSWORD
53+
'*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4' with max_user_connections 10"])
5054
@provider.expects(:exists?).returns(true)
5155
@provider.create.should be_true
5256
end

0 commit comments

Comments
 (0)