Skip to content

Commit 97bcbfb

Browse files
committedJul 23, 2024·
Add test for user on replicaset without auth
1 parent 86f2960 commit 97bcbfb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
 

‎spec/acceptance/replset_spec.rb

+14
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,20 @@ class { 'mongodb::globals':
7373
expect(r.stdout).to match %r{some value}
7474
end
7575
end
76+
77+
it 'create a user' do
78+
pp = <<-EOS
79+
mongodb_user {'testuser':
80+
ensure => present,
81+
password_hash => mongodb_password('testuser', 'passw0rd'),
82+
database => 'testdb',
83+
roles => ['readWrite', 'dbAdmin'],
84+
}
85+
EOS
86+
87+
apply_manifest_on(hosts, pp, catch_failures: true)
88+
apply_manifest_on(hosts, pp, catch_changes: true)
89+
end
7690
end
7791

7892
describe 'mongodb::server with replset_members' do

0 commit comments

Comments
 (0)
Please sign in to comment.