Skip to content

Commit

Permalink
[cleanup] Remove version check, since we only support from 4 and high…
Browse files Browse the repository at this point in the history
…er now
  • Loading branch information
Johan De Wit authored and stevenpost committed Mar 18, 2024
1 parent 7d7bbae commit d51090a
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions spec/unit/puppet/provider/mongodb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,15 @@
end

describe 'mongo version detection' do
v = {
'4.x.x' => { '26' => false, '4' => true, '5' => false },
'5.x.x' => { '26' => false, '4' => false, '5' => true },
'x.x.x' => { '26' => false, '4' => false, '5' => false }
}
v = [
'4.x.x',
'5.x.x',
'x.x.x'
]

v.each do |key, results|
v.each do |key|
it "version detection for [#{key}]" do
allow(provider_class).to receive(:mongo_eval).with('db.version()').and_return(key)
expect(provider_class.mongo_4?).to be results['4']
expect(provider_class.mongo_5?).to be results['5']
end
end
end
Expand Down

0 comments on commit d51090a

Please sign in to comment.