Skip to content

Commit dfdfa65

Browse files
committed
Unit tests
1 parent d496250 commit dfdfa65

10 files changed

+228
-43
lines changed

api/v1/role/rolebuilder.go

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
package role
2+
3+
import (
4+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
5+
6+
"github.com/mongodb/mongodb-kubernetes/api/v1/mdb"
7+
)
8+
9+
type ClusterMongoDBRoleBuilder struct {
10+
name string
11+
finalizers []string
12+
annotations map[string]string
13+
mongoDBRole mdb.MongoDBRole
14+
}
15+
16+
func DefaultClusterMongoDBRoleBuilder() *ClusterMongoDBRoleBuilder {
17+
return &ClusterMongoDBRoleBuilder{
18+
name: "default-role",
19+
finalizers: []string{},
20+
mongoDBRole: mdb.MongoDBRole{
21+
Role: "default-role",
22+
AuthenticationRestrictions: nil,
23+
Db: "admin",
24+
Privileges: nil,
25+
Roles: []mdb.InheritedRole{
26+
{
27+
Role: "readWrite",
28+
Db: "admin",
29+
},
30+
},
31+
},
32+
annotations: map[string]string{},
33+
}
34+
}
35+
36+
func (b *ClusterMongoDBRoleBuilder) SetName(name string) *ClusterMongoDBRoleBuilder {
37+
b.name = name
38+
return b
39+
}
40+
41+
func (b *ClusterMongoDBRoleBuilder) AddFinalizer(finalizer string) *ClusterMongoDBRoleBuilder {
42+
b.finalizers = append(b.finalizers, finalizer)
43+
return b
44+
}
45+
46+
func (b *ClusterMongoDBRoleBuilder) SetMongoDBRole(role mdb.MongoDBRole) *ClusterMongoDBRoleBuilder {
47+
b.mongoDBRole = role
48+
return b
49+
}
50+
51+
func (b *ClusterMongoDBRoleBuilder) AddAnnotation(key, value string) *ClusterMongoDBRoleBuilder {
52+
b.annotations[key] = value
53+
return b
54+
}
55+
56+
func (b *ClusterMongoDBRoleBuilder) Build() *ClusterMongoDBRole {
57+
return &ClusterMongoDBRole{
58+
ObjectMeta: metav1.ObjectMeta{
59+
Name: b.name,
60+
Finalizers: b.finalizers,
61+
Annotations: b.annotations,
62+
},
63+
Spec: ClusterMongoDBRoleSpec{
64+
MongoDBRole: b.mongoDBRole,
65+
},
66+
}
67+
}

controllers/operator/authentication_test.go

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func TestX509CanBeEnabled_WhenThereAreOnlyTlsDeployments_ReplicaSet(t *testing.T
4747

4848
addKubernetesTlsResources(ctx, kubeClient, rs)
4949

50-
reconciler := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, omConnectionFactory.GetConnectionFunc)
50+
reconciler := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, false, omConnectionFactory.GetConnectionFunc)
5151
checkReconcileSuccessful(ctx, t, reconciler, rs, kubeClient)
5252
}
5353

@@ -57,7 +57,7 @@ func TestX509ClusterAuthentication_CanBeEnabled_IfX509AuthenticationIsEnabled_Re
5757
kubeClient, omConnectionFactory := mock.NewDefaultFakeClient(rs)
5858
addKubernetesTlsResources(ctx, kubeClient, rs)
5959

60-
reconciler := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, omConnectionFactory.GetConnectionFunc)
60+
reconciler := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, false, omConnectionFactory.GetConnectionFunc)
6161
checkReconcileSuccessful(ctx, t, reconciler, rs, kubeClient)
6262
}
6363

@@ -90,7 +90,7 @@ func TestUpdateOmAuthentication_NoAuthenticationEnabled(t *testing.T) {
9090
processNames := []string{"my-rs-0", "my-rs-1", "my-rs-2"}
9191

9292
kubeClient, omConnectionFactory := mock.NewDefaultFakeClient(rs)
93-
r := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, omConnectionFactory.GetConnectionFunc)
93+
r := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, false, omConnectionFactory.GetConnectionFunc)
9494
r.updateOmAuthentication(ctx, conn, processNames, rs, "", "", "", false, zap.S())
9595

9696
ac, _ := conn.ReadAutomationConfig()
@@ -111,7 +111,7 @@ func TestUpdateOmAuthentication_EnableX509_TlsNotEnabled(t *testing.T) {
111111
rs.Spec.Security.TLSConfig.Enabled = true
112112

113113
kubeClient, omConnectionFactory := mock.NewDefaultFakeClient(rs)
114-
r := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, omConnectionFactory.GetConnectionFunc)
114+
r := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, false, omConnectionFactory.GetConnectionFunc)
115115
status, isMultiStageReconciliation := r.updateOmAuthentication(ctx, conn, []string{"my-rs-0", "my-rs-1", "my-rs-2"}, rs, "", "", "", false, zap.S())
116116

117117
assert.True(t, status.IsOK(), "configuring both options at once should not result in a failed status")
@@ -123,7 +123,7 @@ func TestUpdateOmAuthentication_EnableX509_WithTlsAlreadyEnabled(t *testing.T) {
123123
rs := DefaultReplicaSetBuilder().SetName("my-rs").SetMembers(3).EnableTLS().Build()
124124
omConnectionFactory := om.NewCachedOMConnectionFactoryWithInitializedConnection(om.NewMockedOmConnection(deployment.CreateFromReplicaSet("fake-mongoDBImage", false, rs)))
125125
kubeClient := mock.NewDefaultFakeClientWithOMConnectionFactory(omConnectionFactory, rs)
126-
r := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, omConnectionFactory.GetConnectionFunc)
126+
r := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, false, omConnectionFactory.GetConnectionFunc)
127127
status, isMultiStageReconciliation := r.updateOmAuthentication(ctx, omConnectionFactory.GetConnection(), []string{"my-rs-0", "my-rs-1", "my-rs-2"}, rs, "", "", "", false, zap.S())
128128

129129
assert.True(t, status.IsOK(), "configuring x509 when tls has already been enabled should not result in a failed status")
@@ -138,7 +138,7 @@ func TestUpdateOmAuthentication_AuthenticationIsNotConfigured_IfAuthIsNotSet(t *
138138

139139
omConnectionFactory := om.NewCachedOMConnectionFactoryWithInitializedConnection(om.NewMockedOmConnection(deployment.CreateFromReplicaSet("fake-mongoDBImage", false, rs)))
140140
kubeClient := mock.NewDefaultFakeClientWithOMConnectionFactory(omConnectionFactory, rs)
141-
r := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, omConnectionFactory.GetConnectionFunc)
141+
r := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, false, omConnectionFactory.GetConnectionFunc)
142142

143143
status, _ := r.updateOmAuthentication(ctx, omConnectionFactory.GetConnection(), []string{"my-rs-0", "my-rs-1", "my-rs-2"}, rs, "", "", "", false, zap.S())
144144
assert.True(t, status.IsOK(), "no authentication should have been configured")
@@ -161,7 +161,7 @@ func TestUpdateOmAuthentication_DoesNotDisableAuth_IfAuthIsNotSet(t *testing.T)
161161
Build()
162162

163163
kubeClient, omConnectionFactory := mock.NewDefaultFakeClient(rs)
164-
reconciler := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, omConnectionFactory.GetConnectionFunc)
164+
reconciler := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, false, omConnectionFactory.GetConnectionFunc)
165165

166166
addKubernetesTlsResources(ctx, kubeClient, rs)
167167

@@ -174,7 +174,7 @@ func TestUpdateOmAuthentication_DoesNotDisableAuth_IfAuthIsNotSet(t *testing.T)
174174

175175
rs.Spec.Security.Authentication = nil
176176

177-
reconciler = newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, omConnectionFactory.GetConnectionFunc)
177+
reconciler = newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, false, omConnectionFactory.GetConnectionFunc)
178178

179179
checkReconcileSuccessful(ctx, t, reconciler, rs, kubeClient)
180180

@@ -196,7 +196,7 @@ func TestCanConfigureAuthenticationDisabled_WithNoModes(t *testing.T) {
196196
Build()
197197

198198
kubeClient, omConnectionFactory := mock.NewDefaultFakeClient(rs)
199-
reconciler := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, omConnectionFactory.GetConnectionFunc)
199+
reconciler := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, false, omConnectionFactory.GetConnectionFunc)
200200

201201
addKubernetesTlsResources(ctx, kubeClient, rs)
202202

@@ -208,7 +208,7 @@ func TestUpdateOmAuthentication_EnableX509_FromEmptyDeployment(t *testing.T) {
208208
rs := DefaultReplicaSetBuilder().SetName("my-rs").SetMembers(3).EnableTLS().EnableAuth().EnableX509().Build()
209209
omConnectionFactory := om.NewCachedOMConnectionFactoryWithInitializedConnection(om.NewMockedOmConnection(om.NewDeployment()))
210210
kubeClient := mock.NewDefaultFakeClientWithOMConnectionFactory(omConnectionFactory, rs)
211-
r := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, omConnectionFactory.GetConnectionFunc)
211+
r := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, false, omConnectionFactory.GetConnectionFunc)
212212
createAgentCSRs(t, ctx, 1, r.client, certsv1.CertificateApproved)
213213

214214
status, isMultiStageReconciliation := r.updateOmAuthentication(ctx, omConnectionFactory.GetConnection(), []string{"my-rs-0", "my-rs-1", "my-rs-2"}, rs, "", "", "", false, zap.S())
@@ -228,7 +228,7 @@ func TestX509AgentUserIsCorrectlyConfigured(t *testing.T) {
228228

229229
// configure x509/tls resources
230230
addKubernetesTlsResources(ctx, kubeClient, rs)
231-
reconciler := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, omConnectionFactory.GetConnectionFunc)
231+
reconciler := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, false, omConnectionFactory.GetConnectionFunc)
232232

233233
checkReconcileSuccessful(ctx, t, reconciler, rs, kubeClient)
234234

@@ -264,7 +264,7 @@ func TestScramAgentUserIsCorrectlyConfigured(t *testing.T) {
264264

265265
assert.NoError(t, err)
266266

267-
reconciler := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, omConnectionFactory.GetConnectionFunc)
267+
reconciler := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, false, omConnectionFactory.GetConnectionFunc)
268268

269269
checkReconcileSuccessful(ctx, t, reconciler, rs, kubeClient)
270270

@@ -294,7 +294,7 @@ func TestScramAgentUser_IsNotOverridden(t *testing.T) {
294294
}
295295
})
296296

297-
reconciler := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, omConnectionFactory.GetConnectionFunc)
297+
reconciler := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, false, omConnectionFactory.GetConnectionFunc)
298298

299299
checkReconcileSuccessful(ctx, t, reconciler, rs, kubeClient)
300300

@@ -313,7 +313,7 @@ func TestX509InternalClusterAuthentication_CanBeEnabledWithScram_ReplicaSet(t *t
313313
Build()
314314

315315
kubeClient, omConnectionFactory := mock.NewDefaultFakeClient(rs)
316-
r := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, omConnectionFactory.GetConnectionFunc)
316+
r := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, false, omConnectionFactory.GetConnectionFunc)
317317
addKubernetesTlsResources(ctx, r.client, rs)
318318

319319
checkReconcileSuccessful(ctx, t, r, rs, kubeClient)
@@ -366,7 +366,7 @@ func TestConfigureLdapDeploymentAuthentication_WithScramAgentAuthentication(t *t
366366
Build()
367367

368368
kubeClient, omConnectionFactory := mock.NewDefaultFakeClient(rs)
369-
r := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, omConnectionFactory.GetConnectionFunc)
369+
r := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, false, omConnectionFactory.GetConnectionFunc)
370370
data := map[string]string{
371371
"password": "LITZTOd6YiCV8j",
372372
}
@@ -423,7 +423,7 @@ func TestConfigureLdapDeploymentAuthentication_WithCustomRole(t *testing.T) {
423423
Build()
424424

425425
kubeClient, omConnectionFactory := mock.NewDefaultFakeClient(rs)
426-
r := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, omConnectionFactory.GetConnectionFunc)
426+
r := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, false, omConnectionFactory.GetConnectionFunc)
427427
data := map[string]string{
428428
"password": "LITZTOd6YiCV8j",
429429
}
@@ -477,7 +477,7 @@ func TestConfigureLdapDeploymentAuthentication_WithAuthzQueryTemplate_AndUserToD
477477
Build()
478478

479479
kubeClient, omConnectionFactory := mock.NewDefaultFakeClient(rs)
480-
r := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, omConnectionFactory.GetConnectionFunc)
480+
r := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, false, omConnectionFactory.GetConnectionFunc)
481481
data := map[string]string{
482482
"password": "LITZTOd6YiCV8j",
483483
}
@@ -740,7 +740,7 @@ func TestInvalidPEM_SecretDoesNotContainKey(t *testing.T) {
740740
Build()
741741

742742
kubeClient, omConnectionFactory := mock.NewDefaultFakeClient(rs)
743-
reconciler := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, omConnectionFactory.GetConnectionFunc)
743+
reconciler := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, false, omConnectionFactory.GetConnectionFunc)
744744
addKubernetesTlsResources(ctx, kubeClient, rs)
745745

746746
// Replace the secret with an empty one
@@ -795,7 +795,7 @@ func Test_NoExternalDomainPresent(t *testing.T) {
795795
rs.Spec.ExternalAccessConfiguration = &mdbv1.ExternalAccessConfiguration{ExternalDomain: ptr.To("foo")}
796796

797797
kubeClient, omConnectionFactory := mock.NewDefaultFakeClient(rs)
798-
reconciler := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, omConnectionFactory.GetConnectionFunc)
798+
reconciler := newReplicaSetReconciler(ctx, kubeClient, nil, "", "", false, false, omConnectionFactory.GetConnectionFunc)
799799
addKubernetesTlsResources(ctx, kubeClient, rs)
800800

801801
secret := &corev1.Secret{}

controllers/operator/common_controller_test.go

Lines changed: 117 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323

2424
mdbv1 "github.com/mongodb/mongodb-kubernetes/api/v1/mdb"
2525
omv1 "github.com/mongodb/mongodb-kubernetes/api/v1/om"
26+
"github.com/mongodb/mongodb-kubernetes/api/v1/role"
2627
"github.com/mongodb/mongodb-kubernetes/api/v1/status"
2728
"github.com/mongodb/mongodb-kubernetes/controllers/om"
2829
"github.com/mongodb/mongodb-kubernetes/controllers/om/deployment"
@@ -265,6 +266,121 @@ func TestReadSubjectNoCertificate(t *testing.T) {
265266
assertSubjectFromFileFails(t, "testdata/certificates/just_key")
266267
}
267268

269+
func TestFailWhenRoleAndRoleRefsAreConfigured(t *testing.T) {
270+
ctx := context.Background()
271+
customRole := mdbv1.MongoDBRole{
272+
Role: "foo",
273+
AuthenticationRestrictions: []mdbv1.AuthenticationRestriction{},
274+
Db: "admin",
275+
Roles: []mdbv1.InheritedRole{{
276+
Db: "admin",
277+
Role: "readWriteAnyDatabase",
278+
}},
279+
}
280+
roleResource := role.DefaultClusterMongoDBRoleBuilder().Build()
281+
roleRef := mdbv1.MongoDBRoleRef{
282+
Name: roleResource.Name,
283+
Kind: util.ClusterMongoDBRoleKind,
284+
}
285+
assert.Nil(t, customRole.Privileges)
286+
rs := mdbv1.NewDefaultReplicaSetBuilder().SetRoles([]mdbv1.MongoDBRole{customRole}).SetRoleRefs([]mdbv1.MongoDBRoleRef{roleRef}).Build()
287+
288+
kubeClient, omConnectionFactory := mock.NewDefaultFakeClient()
289+
controller := NewReconcileCommonController(ctx, kubeClient)
290+
mockOm, _ := prepareConnection(ctx, controller, omConnectionFactory.GetConnectionFunc, t)
291+
292+
result := controller.ensureRoles(ctx, rs.Spec.DbCommonSpec, true, mockOm, kube.ObjectKeyFromApiObject(rs), zap.S())
293+
assert.False(t, result.IsOK())
294+
assert.Equal(t, status.PhaseFailed, result.Phase())
295+
296+
ac, err := mockOm.ReadAutomationConfig()
297+
assert.NoError(t, err)
298+
roles, ok := ac.Deployment["roles"].([]mdbv1.MongoDBRole)
299+
assert.False(t, ok)
300+
assert.Empty(t, roles)
301+
}
302+
303+
func TestRoleRefsAreAdded(t *testing.T) {
304+
ctx := context.Background()
305+
roleResource := role.DefaultClusterMongoDBRoleBuilder().Build()
306+
roleRefs := []mdbv1.MongoDBRoleRef{
307+
{
308+
Name: roleResource.Name,
309+
Kind: util.ClusterMongoDBRoleKind,
310+
},
311+
}
312+
rs := mdbv1.NewDefaultReplicaSetBuilder().SetRoleRefs(roleRefs).Build()
313+
314+
kubeClient, omConnectionFactory := mock.NewDefaultFakeClient()
315+
controller := NewReconcileCommonController(ctx, kubeClient)
316+
mockOm, _ := prepareConnection(ctx, controller, omConnectionFactory.GetConnectionFunc, t)
317+
318+
_ = kubeClient.Create(ctx, roleResource)
319+
320+
controller.ensureRoles(ctx, rs.Spec.DbCommonSpec, true, mockOm, kube.ObjectKeyFromApiObject(rs), zap.S())
321+
322+
ac, err := mockOm.ReadAutomationConfig()
323+
assert.NoError(t, err)
324+
roles, ok := ac.Deployment["roles"].([]mdbv1.MongoDBRole)
325+
assert.True(t, ok)
326+
assert.NotNil(t, roles[0].Privileges)
327+
assert.Len(t, roles, 1)
328+
}
329+
330+
func TestErrorWhenRoleRefIsWrong(t *testing.T) {
331+
ctx := context.Background()
332+
roleResource := role.DefaultClusterMongoDBRoleBuilder().Build()
333+
roleRefs := []mdbv1.MongoDBRoleRef{
334+
{
335+
Name: roleResource.Name,
336+
Kind: "WrongMongoDBRoleReference",
337+
},
338+
}
339+
rs := mdbv1.NewDefaultReplicaSetBuilder().SetRoleRefs(roleRefs).Build()
340+
341+
kubeClient, omConnectionFactory := mock.NewDefaultFakeClient()
342+
controller := NewReconcileCommonController(ctx, kubeClient)
343+
mockOm, _ := prepareConnection(ctx, controller, omConnectionFactory.GetConnectionFunc, t)
344+
345+
_ = kubeClient.Create(ctx, roleResource)
346+
347+
result := controller.ensureRoles(ctx, rs.Spec.DbCommonSpec, true, mockOm, kube.ObjectKeyFromApiObject(rs), zap.S())
348+
assert.False(t, result.IsOK())
349+
assert.Equal(t, status.PhaseFailed, result.Phase())
350+
351+
ac, err := mockOm.ReadAutomationConfig()
352+
assert.NoError(t, err)
353+
roles, ok := ac.Deployment["roles"].([]mdbv1.MongoDBRole)
354+
assert.False(t, ok)
355+
assert.Empty(t, roles)
356+
}
357+
358+
func TestErrorWhenRoleDoesNotExist(t *testing.T) {
359+
ctx := context.Background()
360+
roleResource := role.DefaultClusterMongoDBRoleBuilder().Build()
361+
roleRefs := []mdbv1.MongoDBRoleRef{
362+
{
363+
Name: roleResource.Name,
364+
Kind: util.ClusterMongoDBRoleKind,
365+
},
366+
}
367+
rs := mdbv1.NewDefaultReplicaSetBuilder().SetRoleRefs(roleRefs).Build()
368+
369+
kubeClient, omConnectionFactory := mock.NewDefaultFakeClient()
370+
controller := NewReconcileCommonController(ctx, kubeClient)
371+
mockOm, _ := prepareConnection(ctx, controller, omConnectionFactory.GetConnectionFunc, t)
372+
373+
result := controller.ensureRoles(ctx, rs.Spec.DbCommonSpec, true, mockOm, kube.ObjectKeyFromApiObject(rs), zap.S())
374+
assert.False(t, result.IsOK())
375+
assert.Equal(t, status.PhaseFailed, result.Phase())
376+
377+
ac, err := mockOm.ReadAutomationConfig()
378+
assert.NoError(t, err)
379+
roles, ok := ac.Deployment["roles"].([]mdbv1.MongoDBRole)
380+
assert.False(t, ok)
381+
assert.Empty(t, roles)
382+
}
383+
268384
func TestDontSendNilPrivileges(t *testing.T) {
269385
ctx := context.Background()
270386
customRole := mdbv1.MongoDBRole{
@@ -281,7 +397,7 @@ func TestDontSendNilPrivileges(t *testing.T) {
281397
kubeClient, omConnectionFactory := mock.NewDefaultFakeClient()
282398
controller := NewReconcileCommonController(ctx, kubeClient)
283399
mockOm, _ := prepareConnection(ctx, controller, omConnectionFactory.GetConnectionFunc, t)
284-
ensureRoles(rs.Spec.Security.Roles, mockOm, &zap.SugaredLogger{})
400+
controller.ensureRoles(ctx, rs.Spec.DbCommonSpec, true, mockOm, kube.ObjectKeyFromApiObject(rs), zap.S())
285401
ac, err := mockOm.ReadAutomationConfig()
286402
assert.NoError(t, err)
287403
roles, ok := ac.Deployment["roles"].([]mdbv1.MongoDBRole)

controllers/operator/construct/multicluster/multicluster_replicaset_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func getMultiClusterMongoDB() mdbmulti.MongoDBMultiCluster {
4444
Authentication: &mdb.Authentication{
4545
Modes: []mdb.AuthMode{},
4646
},
47-
Roles: []mdb.MongoDbRole{},
47+
Roles: []mdb.MongoDBRole{},
4848
},
4949
},
5050
ClusterSpecList: mdb.ClusterSpecList{

0 commit comments

Comments
 (0)