@@ -22,7 +22,7 @@ class { 'mongodb::server': }
2222
2323 it 'creates the user' do
2424 shell ( "mongosh testdb --quiet --eval 'db.auth(\" testuser\" ,\" passw0rd\" )'" ) do |r |
25- expect ( r . stdout . chomp ) . to eq ( '1 ' )
25+ expect ( r . stdout . chomp ) . to eq ( '{ ok: 1 } ' )
2626 end
2727 end
2828
@@ -68,7 +68,7 @@ class { 'mongodb::server': port => 27018 }
6868
6969 it 'creates the user' do
7070 shell ( "mongosh testdb --quiet --port 27018 --eval 'db.auth(\" testuser\" ,\" passw0rd\" )'" ) do |r |
71- expect ( r . stdout . chomp ) . to eq ( '1 ' )
71+ expect ( r . stdout . chomp ) . to eq ( '{ ok: 1 } ' )
7272 end
7373 end
7474 end
@@ -93,7 +93,7 @@ class { 'mongodb::server': }
9393
9494 it 'creates the user' do
9595 shell ( "mongosh testdb --quiet --eval 'db.auth(\" testuser\" ,\" passw0rd\" )'" ) do |r |
96- expect ( r . stdout . chomp ) . to eq ( '1 ' )
96+ expect ( r . stdout . chomp ) . to eq ( '{ ok: 1 } ' )
9797 end
9898 end
9999 end
@@ -126,7 +126,7 @@ class { 'mongodb::server': }
126126
127127 it 'allows the testuser' do
128128 shell ( "mongosh testdb --quiet --eval 'db.auth(\" testuser\" ,\" passw0rd\" )'" ) do |r |
129- expect ( r . stdout . chomp ) . to eq ( '1 ' )
129+ expect ( r . stdout . chomp ) . to eq ( '{ ok: 1 } ' )
130130 end
131131 end
132132
@@ -138,7 +138,7 @@ class { 'mongodb::server': }
138138
139139 it 'allows the second user to connect to its default database' do
140140 shell ( "mongosh testdb2 --quiet --eval 'db.auth(\" testuser2\" ,\" passw0rd\" )'" ) do |r |
141- expect ( r . stdout . chomp ) . to eq ( '1 ' )
141+ expect ( r . stdout . chomp ) . to eq ( '{ ok: 1 } ' )
142142 end
143143 end
144144
0 commit comments