File tree Expand file tree Collapse file tree 3 files changed +1
-32
lines changed
spec/unit/puppet/provider Expand file tree Collapse file tree 3 files changed +1
-32
lines changed Original file line number Diff line number Diff line change @@ -234,30 +234,4 @@ def mongo_version
234234 self . class . mongo_version
235235 end
236236
237- def self . mongo_4?
238- v = mongo_version
239- !v [ %r{^4\. } ] . nil?
240- end
241-
242- def mongo_4?
243- self . class . mongo_4?
244- end
245-
246- def self . mongo_5?
247- v = mongo_version
248- !v [ %r{^5\. } ] . nil?
249- end
250-
251- def mongo_5?
252- self . class . mongo_5?
253- end
254-
255- def self . mongo_6?
256- v = mongo_version
257- !v [ %r{^6\. } ] . nil?
258- end
259-
260- def mongo_6?
261- self . class . mongo_6?
262- end
263237end
Original file line number Diff line number Diff line change @@ -127,9 +127,7 @@ def password=(value)
127127 digestPassword : true
128128 }
129129
130- if mongo_4? || mongo_5? || mongo_6?
131- command [ :mechanisms ] = @resource [ :auth_mechanism ] == :scram_sha_256 ? [ 'SCRAM-SHA-256' ] : [ 'SCRAM-SHA-1' ]
132- end
130+ command [ :mechanisms ] = @resource [ :auth_mechanism ] == :scram_sha_256 ? [ 'SCRAM-SHA-256' ] : [ 'SCRAM-SHA-1' ]
133131
134132 mongo_eval ( "db.runCommand(#{ command . to_json } )" , @resource [ :database ] )
135133 end
Original file line number Diff line number Diff line change 2323 v . each do |key , results |
2424 it "version detection for [#{ key } ]" do
2525 allow ( provider_class ) . to receive ( :mongo_eval ) . with ( 'db.version()' ) . and_return ( key )
26- expect ( provider_class . mongo_4? ) . to be results [ '4' ]
27- expect ( provider_class . mongo_5? ) . to be results [ '5' ]
28- expect ( provider_class . mongo_6? ) . to be results [ '6' ]
2926 end
3027 end
3128 end
You can’t perform that action at this time.
0 commit comments