@@ -183,7 +183,7 @@ func (s) TestRDSWatch(t *testing.T) {
183183 {
184184 Prefix : newStringP ("/" ),
185185 ActionType : xdsresource .RouteActionRoute ,
186- WeightedClusters : map [ string ]xdsresource.WeightedCluster {cdsName : { Weight : 100 }},
186+ WeightedClusters : [ ]xdsresource.WeightedCluster {{ Name : cdsName , Weight : 100 }},
187187 },
188188 },
189189 },
@@ -206,7 +206,7 @@ func (s) TestRDSWatch(t *testing.T) {
206206 {
207207 Prefix : newStringP ("/" ),
208208 ActionType : xdsresource .RouteActionRoute ,
209- WeightedClusters : map [ string ]xdsresource.WeightedCluster {cdsNameNewStyle : { Weight : 100 }},
209+ WeightedClusters : [ ]xdsresource.WeightedCluster {{ Name : cdsNameNewStyle , Weight : 100 }},
210210 },
211211 },
212212 },
@@ -345,7 +345,7 @@ func (s) TestRDSWatch_TwoWatchesForSameResourceName(t *testing.T) {
345345 {
346346 Prefix : newStringP ("/" ),
347347 ActionType : xdsresource .RouteActionRoute ,
348- WeightedClusters : map [ string ]xdsresource.WeightedCluster {cdsName : { Weight : 100 }},
348+ WeightedClusters : [ ]xdsresource.WeightedCluster {{ Name : cdsName , Weight : 100 }},
349349 },
350350 },
351351 },
@@ -361,7 +361,7 @@ func (s) TestRDSWatch_TwoWatchesForSameResourceName(t *testing.T) {
361361 {
362362 Prefix : newStringP ("/" ),
363363 ActionType : xdsresource .RouteActionRoute ,
364- WeightedClusters : map [ string ]xdsresource.WeightedCluster {"new-cds-resource" : { Weight : 100 }},
364+ WeightedClusters : [ ]xdsresource.WeightedCluster {{ Name : "new-cds-resource" , Weight : 100 }},
365365 },
366366 },
367367 },
@@ -383,7 +383,7 @@ func (s) TestRDSWatch_TwoWatchesForSameResourceName(t *testing.T) {
383383 {
384384 Prefix : newStringP ("/" ),
385385 ActionType : xdsresource .RouteActionRoute ,
386- WeightedClusters : map [ string ]xdsresource.WeightedCluster {cdsNameNewStyle : { Weight : 100 }},
386+ WeightedClusters : [ ]xdsresource.WeightedCluster {{ Name : cdsNameNewStyle , Weight : 100 }},
387387 },
388388 },
389389 },
@@ -399,7 +399,7 @@ func (s) TestRDSWatch_TwoWatchesForSameResourceName(t *testing.T) {
399399 {
400400 Prefix : newStringP ("/" ),
401401 ActionType : xdsresource .RouteActionRoute ,
402- WeightedClusters : map [ string ]xdsresource.WeightedCluster {"new-cds-resource" : { Weight : 100 }},
402+ WeightedClusters : [ ]xdsresource.WeightedCluster {{ Name : "new-cds-resource" , Weight : 100 }},
403403 },
404404 },
405405 },
@@ -597,7 +597,7 @@ func (s) TestRDSWatch_ThreeWatchesForDifferentResourceNames(t *testing.T) {
597597 {
598598 Prefix : newStringP ("/" ),
599599 ActionType : xdsresource .RouteActionRoute ,
600- WeightedClusters : map [ string ]xdsresource.WeightedCluster {cdsName : { Weight : 100 }},
600+ WeightedClusters : [ ]xdsresource.WeightedCluster {{ Name : cdsName , Weight : 100 }},
601601 },
602602 },
603603 },
@@ -688,7 +688,7 @@ func (s) TestRDSWatch_ResourceCaching(t *testing.T) {
688688 {
689689 Prefix : newStringP ("/" ),
690690 ActionType : xdsresource .RouteActionRoute ,
691- WeightedClusters : map [ string ]xdsresource.WeightedCluster {cdsName : { Weight : 100 }},
691+ WeightedClusters : [ ]xdsresource.WeightedCluster {{ Name : cdsName , Weight : 100 }},
692692 },
693693 },
694694 },
@@ -819,7 +819,7 @@ func (s) TestRDSWatch_ValidResponseCancelsExpiryTimerBehavior(t *testing.T) {
819819 {
820820 Prefix : newStringP ("/" ),
821821 ActionType : xdsresource .RouteActionRoute ,
822- WeightedClusters : map [ string ]xdsresource.WeightedCluster {cdsName : { Weight : 100 }},
822+ WeightedClusters : [ ]xdsresource.WeightedCluster {{ Name : cdsName , Weight : 100 }},
823823 },
824824 },
825825 },
@@ -983,7 +983,7 @@ func (s) TestRDSWatch_PartialValid(t *testing.T) {
983983 {
984984 Prefix : newStringP ("/" ),
985985 ActionType : xdsresource .RouteActionRoute ,
986- WeightedClusters : map [ string ]xdsresource.WeightedCluster {cdsName : { Weight : 100 }},
986+ WeightedClusters : [ ]xdsresource.WeightedCluster {{ Name : cdsName , Weight : 100 }},
987987 },
988988 },
989989 },
0 commit comments