@@ -31,7 +31,7 @@ func TestGlobalClusters_Get(t *testing.T) {
3131 groupID := "1"
3232 clusterName := "appData"
3333
34- mux .HandleFunc (fmt .Sprintf ("/api/atlas/v1.0 /groups/%s/clusters/%s/globalWrites" , groupID , clusterName ), func (w http.ResponseWriter , r * http.Request ) {
34+ mux .HandleFunc (fmt .Sprintf ("/api/atlas/v1.5 /groups/%s/clusters/%s/globalWrites/ " , groupID , clusterName ), func (w http.ResponseWriter , r * http.Request ) {
3535 testMethod (t , r , http .MethodGet )
3636 fmt .Fprint (w , ` {
3737 "customZoneMapping" : {
@@ -53,7 +53,9 @@ func TestGlobalClusters_Get(t *testing.T) {
5353 "customShardKey" : "city",
5454 "db" : "mydata",
5555 "isCustomShardKeyHashed" : true,
56- "isShardKeyUnique" : true
56+ "isShardKeyUnique" : true,
57+ "numInitialChunks" : 4,
58+ "presplitHashedZones" : true
5759 },{
5860 "collection" : "stores",
5961 "customShardKey" : "store_number",
@@ -89,6 +91,8 @@ func TestGlobalClusters_Get(t *testing.T) {
8991 Db : "mydata" ,
9092 IsCustomShardKeyHashed : pointy .Bool (true ),
9193 IsShardKeyUnique : pointy .Bool (true ),
94+ NumInitialChunks : 4 ,
95+ PresplitHashedZones : pointy .Bool (true ),
9296 }, {
9397 Collection : "stores" ,
9498 CustomShardKey : "store_number" ,
@@ -115,15 +119,19 @@ func TestGlobalClusters_AddManagedNamespace(t *testing.T) {
115119 CustomShardKey : "city" ,
116120 IsCustomShardKeyHashed : pointy .Bool (true ),
117121 IsShardKeyUnique : pointy .Bool (true ),
122+ NumInitialChunks : 4 ,
123+ PresplitHashedZones : pointy .Bool (true ),
118124 }
119125
120- mux .HandleFunc (fmt .Sprintf ("/api/atlas/v1.0 /groups/%s/clusters/%s/globalWrites/managedNamespaces" , groupID , clusterName ), func (w http.ResponseWriter , r * http.Request ) {
126+ mux .HandleFunc (fmt .Sprintf ("/api/atlas/v1.5 /groups/%s/clusters/%s/globalWrites/managedNamespaces" , groupID , clusterName ), func (w http.ResponseWriter , r * http.Request ) {
121127 expectedRequest := map [string ]interface {}{
122128 "db" : "mydata" ,
123129 "collection" : "publishers" ,
124130 "customShardKey" : "city" ,
125131 "isCustomShardKeyHashed" : true ,
126132 "isShardKeyUnique" : true ,
133+ "numInitialChunks" : float64 (4 ),
134+ "presplitHashedZones" : true ,
127135 }
128136
129137 jsonBlob := `
@@ -209,7 +217,7 @@ func TestGlobalClusters_DeleteManagedNamespace(t *testing.T) {
209217 Collection : "distributors" ,
210218 }
211219
212- mux .HandleFunc (fmt .Sprintf ("/api/atlas/v1.0 /groups/%s/clusters/%s/globalWrites/managedNamespaces" , groupID , name ), func (w http.ResponseWriter , r * http.Request ) {
220+ mux .HandleFunc (fmt .Sprintf ("/api/atlas/v1.5 /groups/%s/clusters/%s/globalWrites/managedNamespaces" , groupID , name ), func (w http.ResponseWriter , r * http.Request ) {
213221 if collection := r .URL .Query ().Get ("collection" ); collection != mn .Collection {
214222 t .Errorf ("expected query param collection = '%s', received '%s'" , mn .Collection , collection )
215223 }
@@ -305,7 +313,7 @@ func TestGlobalClusters_AddCustomZoneMappings(t *testing.T) {
305313 },
306314 }
307315
308- mux .HandleFunc (fmt .Sprintf ("/api/atlas/v1.0 /groups/%s/clusters/%s/globalWrites/customZoneMapping" , groupID , clusterName ), func (w http.ResponseWriter , r * http.Request ) {
316+ mux .HandleFunc (fmt .Sprintf ("/api/atlas/v1.5 /groups/%s/clusters/%s/globalWrites/customZoneMapping" , groupID , clusterName ), func (w http.ResponseWriter , r * http.Request ) {
309317 expectedRequest := map [string ]interface {}{
310318 "customZoneMappings" : []interface {}{
311319 map [string ]interface {}{"location" : "CA" , "zone" : "Zone 1" },
@@ -358,7 +366,7 @@ func TestGlobalClusters_DeleteCustomZoneMappings(t *testing.T) {
358366 groupID := "1"
359367 name := "appData"
360368
361- mux .HandleFunc (fmt .Sprintf ("/api/atlas/v1.0 /groups/%s/clusters/%s/globalWrites/customZoneMapping" , groupID , name ), func (w http.ResponseWriter , r * http.Request ) {
369+ mux .HandleFunc (fmt .Sprintf ("/api/atlas/v1.5 /groups/%s/clusters/%s/globalWrites/customZoneMapping" , groupID , name ), func (w http.ResponseWriter , r * http.Request ) {
362370 jsonBlob := `
363371 {
364372 "customZoneMapping" : { },
0 commit comments