Skip to content

Commit

Permalink
fixup! fixup! Users should be created before the database
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenpost committed Mar 27, 2024
1 parent 2971745 commit e68fb43
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions spec/acceptance/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ class { 'mongodb::globals':
}
-> class { 'mongodb::server': }
-> class { 'mongodb::client': }
-> mongodb_database { 'testdb': ensure => present }
->
mongodb_database { 'testdb': ensure => present }
mongodb_user {'testuser':
ensure => present,
password_hash => mongodb_password('testuser', 'passw0rd'),
Expand All @@ -40,8 +41,9 @@ class { 'mongodb::globals':
}
-> class { 'mongodb::server': }
-> class { 'mongodb::client': }
-> mongodb_database { 'testdb': ensure => present }
->
mongodb_database { 'testdb': ensure => present }
mongodb_user {'testuser':
ensure => absent,
password_hash => mongodb_password('testuser', 'passw0rd'),
Expand All @@ -68,8 +70,9 @@ class { 'mongodb::globals':
}
-> class { 'mongodb::server': port => 27018 }
-> class { 'mongodb::client': }
-> mongodb_database { 'testdb': ensure => present }
->
mongodb_database { 'testdb': ensure => present }
mongodb_user {'testuser':
ensure => present,
password_hash => mongodb_password('testuser', 'passw0rd'),
Expand All @@ -96,8 +99,9 @@ class { 'mongodb::globals':
}
-> class { 'mongodb::server': }
-> class { 'mongodb::client': }
-> mongodb_database { 'testdb': ensure => present }
->
mongodb_database { 'testdb': ensure => present }
mongodb_user {'testuser':
ensure => present,
password_hash => mongodb_password('testuser', 'passw0rd'),
Expand Down Expand Up @@ -125,16 +129,18 @@ class { 'mongodb::globals':
}
-> class { 'mongodb::server': }
-> class { 'mongodb::client': }
-> mongodb_database { 'testdb': ensure => present }
-> mongodb_database { 'testdb2': ensure => present }
->
mongodb_database { 'testdb': ensure => present }
mongodb_database { 'testdb2': ensure => present }
mongodb_user {'testuser':
ensure => present,
password_hash => mongodb_password('testuser', 'passw0rd'),
database => 'testdb',
roles => ['readWrite', 'dbAdmin'],
}
->
mongodb_user {'testuser2':
ensure => present,
password_hash => mongodb_password('testuser2', 'passw0rd'),
Expand Down

0 comments on commit e68fb43

Please sign in to comment.