@@ -330,9 +330,13 @@ func Test_IsActiveIn(t *testing.T) {
330
330
isGlobalDomain : true ,
331
331
currentCluster : "A" ,
332
332
activeClusters : & types.ActiveClusters {
333
- ActiveClustersByRegion : map [string ]types.ActiveClusterInfo {
334
- "region0" : {ActiveClusterName : "A" },
335
- "region1" : {ActiveClusterName : "B" },
333
+ AttributeScopes : map [string ]types.ClusterAttributeScope {
334
+ "region" : {
335
+ ClusterAttributes : map [string ]types.ActiveClusterInfo {
336
+ "region0" : {ActiveClusterName : "A" },
337
+ "region1" : {ActiveClusterName : "B" },
338
+ },
339
+ },
336
340
},
337
341
},
338
342
expectIsActive : true ,
@@ -342,9 +346,13 @@ func Test_IsActiveIn(t *testing.T) {
342
346
isGlobalDomain : true ,
343
347
currentCluster : "C" ,
344
348
activeClusters : & types.ActiveClusters {
345
- ActiveClustersByRegion : map [string ]types.ActiveClusterInfo {
346
- "region0" : {ActiveClusterName : "A" },
347
- "region1" : {ActiveClusterName : "B" },
349
+ AttributeScopes : map [string ]types.ClusterAttributeScope {
350
+ "region" : {
351
+ ClusterAttributes : map [string ]types.ActiveClusterInfo {
352
+ "region0" : {ActiveClusterName : "A" },
353
+ "region1" : {ActiveClusterName : "B" },
354
+ },
355
+ },
348
356
},
349
357
},
350
358
expectIsActive : false ,
@@ -1223,14 +1231,16 @@ func Test_NewDomainNotActiveError(t *testing.T) {
1223
1231
nil ,
1224
1232
true ,
1225
1233
& persistence.DomainReplicationConfig {
1226
- ActiveClusters : & types.ActiveClusters {ActiveClustersByRegion : map [string ]types.ActiveClusterInfo {
1227
- "region1" : {
1228
- ActiveClusterName : "cluster1" ,
1229
- },
1230
- "region2" : {
1231
- ActiveClusterName : "cluster2" ,
1234
+ ActiveClusters : & types.ActiveClusters {
1235
+ AttributeScopes : map [string ]types.ClusterAttributeScope {
1236
+ "region" : {
1237
+ ClusterAttributes : map [string ]types.ActiveClusterInfo {
1238
+ "region1" : {ActiveClusterName : "cluster1" },
1239
+ "region2" : {ActiveClusterName : "cluster2" },
1240
+ },
1241
+ },
1232
1242
},
1233
- }} ,
1243
+ },
1234
1244
},
1235
1245
0 ,
1236
1246
nil ,
@@ -1273,14 +1283,16 @@ func Test_getActiveClusters(t *testing.T) {
1273
1283
msg : "active-active domain" ,
1274
1284
replicationConfig : & persistence.DomainReplicationConfig {
1275
1285
ActiveClusterName : "active" ,
1276
- ActiveClusters : & types.ActiveClusters {ActiveClustersByRegion : map [string ]types.ActiveClusterInfo {
1277
- "region1" : {
1278
- ActiveClusterName : "cluster1" ,
1279
- },
1280
- "region2" : {
1281
- ActiveClusterName : "cluster2" ,
1286
+ ActiveClusters : & types.ActiveClusters {
1287
+ AttributeScopes : map [string ]types.ClusterAttributeScope {
1288
+ "region" : {
1289
+ ClusterAttributes : map [string ]types.ActiveClusterInfo {
1290
+ "region1" : {ActiveClusterName : "cluster1" },
1291
+ "region2" : {ActiveClusterName : "cluster2" },
1292
+ },
1293
+ },
1282
1294
},
1283
- }} ,
1295
+ },
1284
1296
},
1285
1297
expectedActiveClusters : []string {"cluster1" , "cluster2" },
1286
1298
},
0 commit comments