File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 26
26
autorequire ( :service ) do
27
27
%w[ mongodb mongod ]
28
28
end
29
-
30
- autorequire ( :mongodb_database ) do
31
- self [ :user ]
32
- end
33
29
end
Original file line number Diff line number Diff line change @@ -117,6 +117,10 @@ def insync?(_is)
117
117
%w[ mongodb mongod ]
118
118
end
119
119
120
+ autobefore ( :mongodb_database ) do
121
+ self [ :database ]
122
+ end
123
+
120
124
validate do
121
125
if self [ :password_hash ] . nil? && self [ :password ] . nil? && provider . password . nil? && provider . password_hash . nil?
122
126
err ( "Either 'password_hash' or 'password' should be provided" )
Original file line number Diff line number Diff line change 25
25
is_expected . to contain_mongodb_user ( 'User testuser on db testdb' ) . \
26
26
with_username ( 'testuser' ) . \
27
27
with_database ( 'testdb' ) . \
28
- that_requires ( 'Mongodb_database[testdb]' )
28
+ that_comes_before ( 'Mongodb_database[testdb]' )
29
29
end
30
30
31
31
it 'contains mongodb_user with proper roles' do
65
65
is_expected . to contain_mongodb_user ( 'User testuser on db testdb' ) . \
66
66
with_username ( 'testuser' ) . \
67
67
with_database ( 'testdb' ) . \
68
- that_requires ( 'Mongodb_database[testdb]' )
68
+ that_comes_before ( 'Mongodb_database[testdb]' )
69
69
end
70
70
71
71
it 'contains mongodb_user with proper roles' do
You can’t perform that action at this time.
0 commit comments