Skip to content

Commit 4a16432

Browse files
coderGo93Edgar Lopez
andauthored
added parameter version release system for advanced cluster and its test (#258)
Co-authored-by: Edgar Lopez <edgarlopez@pop-os.localdomain>
1 parent 151291e commit 4a16432

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

mongodbatlas/advanced_clusters.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ type AdvancedCluster struct {
6161
ReplicationSpecs []*AdvancedReplicationSpec `json:"replicationSpecs,omitempty"`
6262
CreateDate string `json:"createDate,omitempty"`
6363
RootCertType string `json:"rootCertType,omitempty"`
64+
VersionReleaseSystem string `json:"versionReleaseSystem,omitempty"`
6465
}
6566

6667
type AdvancedReplicationSpec struct {

mongodbatlas/advanced_clusters_test.go

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ func TestAdvancedClusters_List(t *testing.T) {
185185
}
186186
],
187187
"rootCertType": "DST",
188-
"stateName": "CREATING"
188+
"stateName": "CREATING",
189+
"versionReleaseSystem": "LTS"
189190
}
190191
],
191192
"totalCount": 1
@@ -358,8 +359,9 @@ func TestAdvancedClusters_List(t *testing.T) {
358359
},
359360
},
360361
}},
361-
CreateDate: "2021-03-02T22:27:46Z",
362-
RootCertType: "DST",
362+
CreateDate: "2021-03-02T22:27:46Z",
363+
RootCertType: "DST",
364+
VersionReleaseSystem: "LTS",
363365
}},
364366
TotalCount: 1}
365367

@@ -465,7 +467,8 @@ func TestAdvancedClusters_Get(t *testing.T) {
465467
}
466468
],
467469
"rootCertType": "DST",
468-
"stateName": "CREATING"
470+
"stateName": "CREATING",
471+
"versionReleaseSystem": "LTS"
469472
470473
}`)
471474
})
@@ -501,6 +504,7 @@ func TestAdvancedClusters_Get(t *testing.T) {
501504
Paused: &paused,
502505
PitEnabled: &pitEnabled,
503506
StateName: "CREATING",
507+
VersionReleaseSystem: "LTS",
504508
ReplicationSpecs: []*AdvancedReplicationSpec{
505509
{
506510
ID: "2",
@@ -680,7 +684,8 @@ func TestAdvancedClusters_Create(t *testing.T) {
680684
}
681685
],
682686
"rootCertType": "DST",
683-
"stateName": "CREATING"
687+
"stateName": "CREATING",
688+
"versionReleaseSystem": "LTS"
684689
685690
}`)
686691
})
@@ -784,8 +789,9 @@ func TestAdvancedClusters_Create(t *testing.T) {
784789
},
785790
},
786791
}},
787-
CreateDate: "2021-03-02T22:27:46Z",
788-
RootCertType: "DST",
792+
CreateDate: "2021-03-02T22:27:46Z",
793+
RootCertType: "DST",
794+
VersionReleaseSystem: "LTS",
789795
}
790796

791797
cluster, _, err := client.AdvancedClusters.Create(ctx, groupID, requestCluster)
@@ -883,8 +889,9 @@ func TestAdvancedClusters_Create(t *testing.T) {
883889
},
884890
},
885891
}},
886-
CreateDate: "2021-03-02T22:27:46Z",
887-
RootCertType: "DST",
892+
CreateDate: "2021-03-02T22:27:46Z",
893+
RootCertType: "DST",
894+
VersionReleaseSystem: "LTS",
888895
}
889896

890897
if diff := deep.Equal(cluster, expected); diff != nil {

0 commit comments

Comments
 (0)