@@ -151,10 +151,10 @@ var _ = Describe("AtlasDatabaseUser", func() {
151
151
Describe ("Create/Update two users, two clusters" , func () {
152
152
It ("They should be created successfully" , func () {
153
153
By ("Creating clusters" , func () {
154
- createdClusterAWS = mdbv1 .DefaultAWSCluster (namespace .Name , createdProject .Name )
154
+ createdClusterAWS = mdbv1 .DefaultAWSCluster (namespace .Name , createdProject .Name ). Lightweight ()
155
155
Expect (k8sClient .Create (context .Background (), createdClusterAWS )).ToNot (HaveOccurred ())
156
156
157
- createdClusterAzure = mdbv1 .DefaultAzureCluster (namespace .Name , createdProject .Name )
157
+ createdClusterAzure = mdbv1 .DefaultAzureCluster (namespace .Name , createdProject .Name ). Lightweight ()
158
158
Expect (k8sClient .Create (context .Background (), createdClusterAzure )).ToNot (HaveOccurred ())
159
159
160
160
Eventually (testutil .WaitFor (k8sClient , createdClusterAWS , status .TrueCondition (status .ReadyType ), validateClusterCreatingFunc ()),
@@ -184,11 +184,11 @@ var _ = Describe("AtlasDatabaseUser", func() {
184
184
// The user created lacks read/write roles
185
185
err := tryWrite (createdProject .ID (), * createdClusterAzure , * createdDBUser , "test" , "operatortest" )
186
186
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" ))
188
188
189
189
err = tryWrite (createdProject .ID (), * createdClusterAWS , * createdDBUser , "test" , "operatortest" )
190
190
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" ))
192
192
})
193
193
})
194
194
By ("Update database user - give readWrite permissions" , func () {
@@ -267,7 +267,7 @@ var _ = Describe("AtlasDatabaseUser", func() {
267
267
268
268
err := tryWrite (createdProject .ID (), * createdClusterAzure , * secondDBUser , "test" , "someNotAllowedCollection" )
269
269
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" ))
271
271
})
272
272
By ("Removing Second user" , func () {
273
273
Expect (k8sClient .Delete (context .Background (), secondDBUser )).To (Succeed ())
@@ -305,7 +305,7 @@ var _ = Describe("AtlasDatabaseUser", func() {
305
305
checkNumberOfConnectionSecrets (k8sClient , * createdProject , 0 )
306
306
})
307
307
By ("Creating cluster" , func () {
308
- createdClusterAWS = mdbv1 .DefaultAWSCluster (namespace .Name , createdProject .Name )
308
+ createdClusterAWS = mdbv1 .DefaultAWSCluster (namespace .Name , createdProject .Name ). Lightweight ()
309
309
Expect (k8sClient .Create (context .Background (), createdClusterAWS )).ToNot (HaveOccurred ())
310
310
311
311
// We don't wait for the full cluster creation - only when it has started the process
@@ -338,7 +338,7 @@ var _ = Describe("AtlasDatabaseUser", func() {
338
338
Describe ("Check the password Secret is watched" , func () {
339
339
It ("Should succeed" , func () {
340
340
By ("Creating clusters" , func () {
341
- createdClusterAWS = mdbv1 .DefaultAWSCluster (namespace .Name , createdProject .Name )
341
+ createdClusterAWS = mdbv1 .DefaultAWSCluster (namespace .Name , createdProject .Name ). Lightweight ()
342
342
Expect (k8sClient .Create (context .Background (), createdClusterAWS )).ToNot (HaveOccurred ())
343
343
344
344
Eventually (testutil .WaitFor (k8sClient , createdClusterAWS , status .TrueCondition (status .ReadyType ), validateClusterCreatingFunc ()),
@@ -394,10 +394,10 @@ var _ = Describe("AtlasDatabaseUser", func() {
394
394
Describe ("Change database users (make sure all stale secrets are removed)" , func () {
395
395
It ("Should succeed" , func () {
396
396
By ("Creating AWS and Azure clusters" , func () {
397
- createdClusterAWS = mdbv1 .DefaultAWSCluster (namespace .Name , createdProject .Name )
397
+ createdClusterAWS = mdbv1 .DefaultAWSCluster (namespace .Name , createdProject .Name ). Lightweight ()
398
398
Expect (k8sClient .Create (context .Background (), createdClusterAWS )).ToNot (HaveOccurred ())
399
399
400
- createdClusterAzure = mdbv1 .DefaultAzureCluster (namespace .Name , createdProject .Name )
400
+ createdClusterAzure = mdbv1 .DefaultAzureCluster (namespace .Name , createdProject .Name ). Lightweight ()
401
401
Expect (k8sClient .Create (context .Background (), createdClusterAzure )).ToNot (HaveOccurred ())
402
402
403
403
Eventually (testutil .WaitFor (k8sClient , createdClusterAWS , status .TrueCondition (status .ReadyType ), validateClusterCreatingFunc ()),
@@ -463,7 +463,7 @@ var _ = Describe("AtlasDatabaseUser", func() {
463
463
Describe ("Check the user expiration" , func () {
464
464
It ("Should succeed" , func () {
465
465
By ("Creating a AWS cluster" , func () {
466
- createdClusterAWS = mdbv1 .DefaultAWSCluster (namespace .Name , createdProject .Name )
466
+ createdClusterAWS = mdbv1 .DefaultAWSCluster (namespace .Name , createdProject .Name ). Lightweight ()
467
467
Expect (k8sClient .Create (context .Background (), createdClusterAWS )).To (Succeed ())
468
468
469
469
Eventually (testutil .WaitFor (k8sClient , createdClusterAWS , status .TrueCondition (status .ReadyType ), validateClusterCreatingFunc ()),
@@ -529,7 +529,7 @@ var _ = Describe("AtlasDatabaseUser", func() {
529
529
Describe ("Deleting the db user (not cleaning Atlas)" , func () {
530
530
It ("Should Succeed" , func () {
531
531
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 ()
533
533
Expect (k8sClient .Create (context .Background (), createdClusterAWS )).ToNot (HaveOccurred ())
534
534
535
535
Eventually (testutil .WaitFor (k8sClient , createdClusterAWS , status .TrueCondition (status .ReadyType ), validateClusterCreatingFunc ()),
0 commit comments