Skip to content

Commit

Permalink
Add test for user on replicaset without auth
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenpost committed Jul 23, 2024
1 parent 86f2960 commit 97bcbfb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions spec/acceptance/replset_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,20 @@ class { 'mongodb::globals':
expect(r.stdout).to match %r{some value}
end
end

it 'create a user' do
pp = <<-EOS
mongodb_user {'testuser':
ensure => present,
password_hash => mongodb_password('testuser', 'passw0rd'),
database => 'testdb',
roles => ['readWrite', 'dbAdmin'],
}
EOS

apply_manifest_on(hosts, pp, catch_failures: true)
apply_manifest_on(hosts, pp, catch_changes: true)
end
end

describe 'mongodb::server with replset_members' do
Expand Down

0 comments on commit 97bcbfb

Please sign in to comment.