@@ -151,10 +151,10 @@ var _ = Describe("AtlasDatabaseUser", func() {
151151 Describe ("Create/Update two users, two clusters" , func () {
152152 It ("They should be created successfully" , func () {
153153 By ("Creating clusters" , func () {
154- createdClusterAWS = mdbv1 .DefaultAWSCluster (namespace .Name , createdProject .Name )
154+ createdClusterAWS = mdbv1 .DefaultAWSCluster (namespace .Name , createdProject .Name ). Lightweight ()
155155 Expect (k8sClient .Create (context .Background (), createdClusterAWS )).ToNot (HaveOccurred ())
156156
157- createdClusterAzure = mdbv1 .DefaultAzureCluster (namespace .Name , createdProject .Name )
157+ createdClusterAzure = mdbv1 .DefaultAzureCluster (namespace .Name , createdProject .Name ). Lightweight ()
158158 Expect (k8sClient .Create (context .Background (), createdClusterAzure )).ToNot (HaveOccurred ())
159159
160160 Eventually (testutil .WaitFor (k8sClient , createdClusterAWS , status .TrueCondition (status .ReadyType ), validateClusterCreatingFunc ()),
@@ -184,11 +184,11 @@ var _ = Describe("AtlasDatabaseUser", func() {
184184 // The user created lacks read/write roles
185185 err := tryWrite (createdProject .ID (), * createdClusterAzure , * createdDBUser , "test" , "operatortest" )
186186 Expect (err ).To (HaveOccurred ())
187- Expect (err .Error ()).To (MatchRegexp ("not authorized on test to execute command" )) // TODO check this is the same " user is not allowed"
187+ Expect (err .Error ()).To (MatchRegexp ("user is not allowed" ))
188188
189189 err = tryWrite (createdProject .ID (), * createdClusterAWS , * createdDBUser , "test" , "operatortest" )
190190 Expect (err ).To (HaveOccurred ())
191- Expect (err .Error ()).To (MatchRegexp ("not authorized on test to execute command" )) // TODO check this is the same " user is not allowed"
191+ Expect (err .Error ()).To (MatchRegexp ("user is not allowed" ))
192192 })
193193 })
194194 By ("Update database user - give readWrite permissions" , func () {
@@ -267,7 +267,7 @@ var _ = Describe("AtlasDatabaseUser", func() {
267267
268268 err := tryWrite (createdProject .ID (), * createdClusterAzure , * secondDBUser , "test" , "someNotAllowedCollection" )
269269 Expect (err ).To (HaveOccurred ())
270- Expect (err .Error ()).To (MatchRegexp ("not authorized on test to execute command" )) // TODO check this is the same " user is not allowed"
270+ Expect (err .Error ()).To (MatchRegexp ("user is not allowed" ))
271271 })
272272 By ("Removing Second user" , func () {
273273 Expect (k8sClient .Delete (context .Background (), secondDBUser )).To (Succeed ())
@@ -305,7 +305,7 @@ var _ = Describe("AtlasDatabaseUser", func() {
305305 checkNumberOfConnectionSecrets (k8sClient , * createdProject , 0 )
306306 })
307307 By ("Creating cluster" , func () {
308- createdClusterAWS = mdbv1 .DefaultAWSCluster (namespace .Name , createdProject .Name )
308+ createdClusterAWS = mdbv1 .DefaultAWSCluster (namespace .Name , createdProject .Name ). Lightweight ()
309309 Expect (k8sClient .Create (context .Background (), createdClusterAWS )).ToNot (HaveOccurred ())
310310
311311 // We don't wait for the full cluster creation - only when it has started the process
@@ -338,7 +338,7 @@ var _ = Describe("AtlasDatabaseUser", func() {
338338 Describe ("Check the password Secret is watched" , func () {
339339 It ("Should succeed" , func () {
340340 By ("Creating clusters" , func () {
341- createdClusterAWS = mdbv1 .DefaultAWSCluster (namespace .Name , createdProject .Name )
341+ createdClusterAWS = mdbv1 .DefaultAWSCluster (namespace .Name , createdProject .Name ). Lightweight ()
342342 Expect (k8sClient .Create (context .Background (), createdClusterAWS )).ToNot (HaveOccurred ())
343343
344344 Eventually (testutil .WaitFor (k8sClient , createdClusterAWS , status .TrueCondition (status .ReadyType ), validateClusterCreatingFunc ()),
@@ -394,10 +394,10 @@ var _ = Describe("AtlasDatabaseUser", func() {
394394 Describe ("Change database users (make sure all stale secrets are removed)" , func () {
395395 It ("Should succeed" , func () {
396396 By ("Creating AWS and Azure clusters" , func () {
397- createdClusterAWS = mdbv1 .DefaultAWSCluster (namespace .Name , createdProject .Name )
397+ createdClusterAWS = mdbv1 .DefaultAWSCluster (namespace .Name , createdProject .Name ). Lightweight ()
398398 Expect (k8sClient .Create (context .Background (), createdClusterAWS )).ToNot (HaveOccurred ())
399399
400- createdClusterAzure = mdbv1 .DefaultAzureCluster (namespace .Name , createdProject .Name )
400+ createdClusterAzure = mdbv1 .DefaultAzureCluster (namespace .Name , createdProject .Name ). Lightweight ()
401401 Expect (k8sClient .Create (context .Background (), createdClusterAzure )).ToNot (HaveOccurred ())
402402
403403 Eventually (testutil .WaitFor (k8sClient , createdClusterAWS , status .TrueCondition (status .ReadyType ), validateClusterCreatingFunc ()),
@@ -463,7 +463,7 @@ var _ = Describe("AtlasDatabaseUser", func() {
463463 Describe ("Check the user expiration" , func () {
464464 It ("Should succeed" , func () {
465465 By ("Creating a AWS cluster" , func () {
466- createdClusterAWS = mdbv1 .DefaultAWSCluster (namespace .Name , createdProject .Name )
466+ createdClusterAWS = mdbv1 .DefaultAWSCluster (namespace .Name , createdProject .Name ). Lightweight ()
467467 Expect (k8sClient .Create (context .Background (), createdClusterAWS )).To (Succeed ())
468468
469469 Eventually (testutil .WaitFor (k8sClient , createdClusterAWS , status .TrueCondition (status .ReadyType ), validateClusterCreatingFunc ()),
@@ -529,7 +529,7 @@ var _ = Describe("AtlasDatabaseUser", func() {
529529 Describe ("Deleting the db user (not cleaning Atlas)" , func () {
530530 It ("Should Succeed" , func () {
531531 By (`Creating the db user with retention policy "keep" first` , func () {
532- createdClusterAWS = mdbv1 .DefaultAWSCluster (namespace .Name , createdProject .Name )
532+ createdClusterAWS = mdbv1 .DefaultAWSCluster (namespace .Name , createdProject .Name ). Lightweight ()
533533 Expect (k8sClient .Create (context .Background (), createdClusterAWS )).ToNot (HaveOccurred ())
534534
535535 Eventually (testutil .WaitFor (k8sClient , createdClusterAWS , status .TrueCondition (status .ReadyType ), validateClusterCreatingFunc ()),
0 commit comments