File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 2626 autorequire ( :service ) do
2727 %w[ mongodb mongod ]
2828 end
29-
30- autorequire ( :mongodb_database ) do
31- self [ :user ]
32- end
3329end
Original file line number Diff line number Diff line change @@ -117,6 +117,10 @@ def insync?(_is)
117117 %w[ mongodb mongod ]
118118 end
119119
120+ autobefore ( :mongodb_database ) do
121+ self [ :database ]
122+ end
123+
120124 validate do
121125 if self [ :password_hash ] . nil? && self [ :password ] . nil? && provider . password . nil? && provider . password_hash . nil?
122126 err ( "Either 'password_hash' or 'password' should be provided" )
Original file line number Diff line number Diff line change 2525 is_expected . to contain_mongodb_user ( 'User testuser on db testdb' ) . \
2626 with_username ( 'testuser' ) . \
2727 with_database ( 'testdb' ) . \
28- that_requires ( 'Mongodb_database[testdb]' )
28+ that_comes_before ( 'Mongodb_database[testdb]' )
2929 end
3030
3131 it 'contains mongodb_user with proper roles' do
6565 is_expected . to contain_mongodb_user ( 'User testuser on db testdb' ) . \
6666 with_username ( 'testuser' ) . \
6767 with_database ( 'testdb' ) . \
68- that_requires ( 'Mongodb_database[testdb]' )
68+ that_comes_before ( 'Mongodb_database[testdb]' )
6969 end
7070
7171 it 'contains mongodb_user with proper roles' do
You can’t perform that action at this time.
0 commit comments