@@ -69,33 +69,22 @@ const allTestCases: {[lbPolicyName: string]: TestCase[]} = {
69
69
name : 'empty fields' ,
70
70
input : {
71
71
discovery_mechanisms : [ ] ,
72
- locality_picking_policy : [ ] ,
73
- endpoint_picking_policy : [ ]
72
+ xds_lb_policy : [ ]
74
73
}
75
74
} ,
76
75
{
77
76
name : 'missing discovery_mechanisms' ,
78
77
input : {
79
- locality_picking_policy : [ ] ,
80
- endpoint_picking_policy : [ ]
78
+ xds_lb_policy : [ ]
81
79
} ,
82
80
error : / d i s c o v e r y _ m e c h a n i s m s /
83
81
} ,
84
82
{
85
- name : 'missing locality_picking_policy ' ,
83
+ name : 'missing xds_lb_policy ' ,
86
84
input : {
87
- discovery_mechanisms : [ ] ,
88
- endpoint_picking_policy : [ ]
89
- } ,
90
- error : / l o c a l i t y _ p i c k i n g _ p o l i c y /
91
- } ,
92
- {
93
- name : 'missing endpoint_picking_policy' ,
94
- input : {
95
- discovery_mechanisms : [ ] ,
96
- locality_picking_policy : [ ]
85
+ discovery_mechanisms : [ ]
97
86
} ,
98
- error : / e n d p o i n t _ p i c k i n g _ p o l i c y /
87
+ error : / x d s _ l b _ p o l i c y /
99
88
} ,
100
89
{
101
90
name : 'discovery_mechanism: EDS' ,
@@ -104,17 +93,15 @@ const allTestCases: {[lbPolicyName: string]: TestCase[]} = {
104
93
cluster : 'abc' ,
105
94
type : 'EDS'
106
95
} ] ,
107
- locality_picking_policy : [ ] ,
108
- endpoint_picking_policy : [ ]
96
+ xds_lb_policy : [ ]
109
97
} ,
110
98
output : {
111
99
discovery_mechanisms : [ {
112
100
cluster : 'abc' ,
113
101
type : 'EDS' ,
114
102
lrs_load_reporting_server : undefined
115
103
} ] ,
116
- locality_picking_policy : [ ] ,
117
- endpoint_picking_policy : [ ]
104
+ xds_lb_policy : [ ]
118
105
}
119
106
} ,
120
107
{
@@ -124,17 +111,15 @@ const allTestCases: {[lbPolicyName: string]: TestCase[]} = {
124
111
cluster : 'abc' ,
125
112
type : 'LOGICAL_DNS'
126
113
} ] ,
127
- locality_picking_policy : [ ] ,
128
- endpoint_picking_policy : [ ]
114
+ xds_lb_policy : [ ]
129
115
} ,
130
116
output : {
131
117
discovery_mechanisms : [ {
132
118
cluster : 'abc' ,
133
119
type : 'LOGICAL_DNS' ,
134
120
lrs_load_reporting_server : undefined
135
121
} ] ,
136
- locality_picking_policy : [ ] ,
137
- endpoint_picking_policy : [ ]
122
+ xds_lb_policy : [ ]
138
123
}
139
124
} ,
140
125
{
@@ -148,8 +133,7 @@ const allTestCases: {[lbPolicyName: string]: TestCase[]} = {
148
133
dns_hostname : undefined ,
149
134
lrs_load_reporting_server : undefined
150
135
} ] ,
151
- locality_picking_policy : [ ] ,
152
- endpoint_picking_policy : [ ]
136
+ xds_lb_policy : [ ]
153
137
}
154
138
} ,
155
139
{
@@ -170,8 +154,7 @@ const allTestCases: {[lbPolicyName: string]: TestCase[]} = {
170
154
server_features : [ 'test' ]
171
155
}
172
156
} ] ,
173
- locality_picking_policy : [ ] ,
174
- endpoint_picking_policy : [ ]
157
+ xds_lb_policy : [ ]
175
158
}
176
159
}
177
160
] ,
@@ -180,12 +163,30 @@ const allTestCases: {[lbPolicyName: string]: TestCase[]} = {
180
163
name : 'only required fields' ,
181
164
input : {
182
165
cluster : 'abc' ,
166
+ eds_service_name : 'def' ,
183
167
drop_categories : [ ] ,
168
+ lrs_load_reporting_server : {
169
+ server_uri : 'localhost:12345' ,
170
+ channel_creds : [ {
171
+ type : 'google_default' ,
172
+ config : { }
173
+ } ] ,
174
+ server_features : [ 'test' ]
175
+ } ,
184
176
child_policy : [ { round_robin : { } } ]
185
177
} ,
186
178
output : {
187
179
cluster : 'abc' ,
180
+ eds_service_name : 'def' ,
188
181
drop_categories : [ ] ,
182
+ lrs_load_reporting_server : {
183
+ server_uri : 'localhost:12345' ,
184
+ channel_creds : [ {
185
+ type : 'google_default' ,
186
+ config : { }
187
+ } ] ,
188
+ server_features : [ 'test' ]
189
+ } ,
189
190
child_policy : [ { round_robin : { } } ] ,
190
191
max_concurrent_requests : 1024
191
192
}
@@ -194,88 +195,55 @@ const allTestCases: {[lbPolicyName: string]: TestCase[]} = {
194
195
name : 'undefined optional fields' ,
195
196
input : {
196
197
cluster : 'abc' ,
197
- drop_categories : [ ] ,
198
- child_policy : [ { round_robin : { } } ] ,
199
- eds_service_name : undefined ,
200
- max_concurrent_requests : undefined
201
- } ,
202
- output : {
203
- cluster : 'abc' ,
204
- drop_categories : [ ] ,
205
- child_policy : [ { round_robin : { } } ] ,
206
- max_concurrent_requests : 1024
207
- }
208
- } ,
209
- {
210
- name : 'populated optional fields' ,
211
- input : {
212
- cluster : 'abc' ,
213
- drop_categories : [ {
214
- category : 'test' ,
215
- requests_per_million : 100
216
- } ] ,
217
- child_policy : [ { round_robin : { } } ] ,
218
- eds_service_name : 'def' ,
219
- max_concurrent_requests : 123
220
- } ,
221
- }
222
- ] ,
223
- lrs : [
224
- {
225
- name : 'only required fields' ,
226
- input : {
227
- cluster_name : 'abc' ,
228
198
eds_service_name : 'def' ,
229
- locality : { } ,
230
- child_policy : [ { round_robin : { } } ] ,
199
+ drop_categories : [ ] ,
231
200
lrs_load_reporting_server : {
232
201
server_uri : 'localhost:12345' ,
233
202
channel_creds : [ {
234
203
type : 'google_default' ,
235
204
config : { }
236
205
} ] ,
237
206
server_features : [ 'test' ]
238
- }
207
+ } ,
208
+ child_policy : [ { round_robin : { } } ] ,
209
+ max_concurrent_requests : undefined
239
210
} ,
240
211
output : {
241
- cluster_name : 'abc' ,
212
+ cluster : 'abc' ,
242
213
eds_service_name : 'def' ,
243
- locality : {
244
- region : '' ,
245
- zone : '' ,
246
- sub_zone : ''
247
- } ,
248
- child_policy : [ { round_robin : { } } ] ,
214
+ drop_categories : [ ] ,
249
215
lrs_load_reporting_server : {
250
216
server_uri : 'localhost:12345' ,
251
217
channel_creds : [ {
252
218
type : 'google_default' ,
253
219
config : { }
254
220
} ] ,
255
221
server_features : [ 'test' ]
256
- }
222
+ } ,
223
+ child_policy : [ { round_robin : { } } ] ,
224
+ max_concurrent_requests : 1024
257
225
}
258
226
} ,
259
227
{
260
228
name : 'populated optional fields' ,
261
229
input : {
262
- cluster_name : 'abc' ,
230
+ cluster : 'abc' ,
263
231
eds_service_name : 'def' ,
264
- locality : {
265
- region : 'a' ,
266
- zone : 'b' ,
267
- sub_zone : 'c'
268
- } ,
269
- child_policy : [ { round_robin : { } } ] ,
232
+ drop_categories : [ {
233
+ category : 'test' ,
234
+ requests_per_million : 100
235
+ } ] ,
270
236
lrs_load_reporting_server : {
271
237
server_uri : 'localhost:12345' ,
272
238
channel_creds : [ {
273
239
type : 'google_default' ,
274
240
config : { }
275
241
} ] ,
276
242
server_features : [ 'test' ]
277
- }
278
- }
243
+ } ,
244
+ child_policy : [ { round_robin : { } } ] ,
245
+ max_concurrent_requests : 123
246
+ } ,
279
247
}
280
248
] ,
281
249
priority : [
0 commit comments