Skip to content

Commit

Permalink
SIRE-9538 attenpt to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernd Eilers committed Jun 23, 2023
1 parent 2b7373b commit 9e839e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions spec/classes/server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@

on_supported_os.each do |os, facts|
context "on #{os}" do
let(:pre_condition) do
"class { 'mongodb::globals': version => '6.0.0' }"
end
facts.merge({ mongodb_version: '6.0.0' })
major_version = 6
mongo_cli = if major_version >= 5
Expand Down Expand Up @@ -107,8 +104,8 @@
it_behaves_like 'server classes'

it do
is_expected.to contain_mongodb__db('admin').
with_user('admin').
is_expected.to contain_mongodb__user('admin').
with_username('admin').
with_password('password').
with_roles(%w[userAdmin readWrite dbAdmin dbAdminAnyDatabase readAnyDatabase
readWriteAnyDatabase userAdminAnyDatabase clusterAdmin clusterManager
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/mongodb_version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
describe 'mongodb_version' do
context 'with value' do
before do
allow(Facter::Core::Execution).to receive(:which).with('mongo').and_return(true)
allow(Facter::Core::Execution).to receive(:execute).with('mongo --version 2>&1').and_return('MongoDB shell version: 3.2.1')
allow(Facter::Core::Execution).to receive(:which).with('mongod').and_return(true)
allow(Facter::Core::Execution).to receive(:execute).with('mongod --version 2>&1').and_return('db version: 3.2.1')
end

it {
Expand Down

0 comments on commit 9e839e0

Please sign in to comment.