@@ -129,11 +129,13 @@ func TestDirector_HandleRequest(t *testing.T) {
129129 defaultSuccessfulScheduleResults := & schedulingtypes.SchedulingResult {
130130 ProfileResults : map [string ]* schedulingtypes.ProfileRunResult {
131131 "testProfile" : {
132- TargetPod : & schedulingtypes.ScoredPod {
133- Pod : & schedulingtypes.PodMetrics {
134- Pod : & backend.Pod {
135- Address : "192.168.1.100" ,
136- NamespacedName : k8stypes.NamespacedName {Name : "pod1" , Namespace : "default" },
132+ TargetPods : []schedulingtypes.Pod {
133+ & schedulingtypes.ScoredPod {
134+ Pod : & schedulingtypes.PodMetrics {
135+ Pod : & backend.Pod {
136+ Address : "192.168.1.100" ,
137+ NamespacedName : k8stypes.NamespacedName {Name : "pod1" , Namespace : "default" },
138+ },
137139 },
138140 },
139141 },
@@ -168,7 +170,7 @@ func TestDirector_HandleRequest(t *testing.T) {
168170 NamespacedName : types.NamespacedName {Namespace : "default" , Name : "pod1" },
169171 Address : "192.168.1.100" ,
170172 },
171- TargetEndpoint : "192.168.1.100:8000" ,
173+ TargetDestination : "192.168.1.100:8000" ,
172174 },
173175 wantMutatedBodyModel : model ,
174176 },
@@ -193,7 +195,7 @@ func TestDirector_HandleRequest(t *testing.T) {
193195 NamespacedName : types.NamespacedName {Namespace : "default" , Name : "pod1" },
194196 Address : "192.168.1.100" ,
195197 },
196- TargetEndpoint : "192.168.1.100:8000" ,
198+ TargetDestination : "192.168.1.100:8000" ,
197199 },
198200 wantMutatedBodyModel : model ,
199201 },
@@ -222,7 +224,7 @@ func TestDirector_HandleRequest(t *testing.T) {
222224 NamespacedName : types.NamespacedName {Namespace : "default" , Name : "pod1" },
223225 Address : "192.168.1.100" ,
224226 },
225- TargetEndpoint : "192.168.1.100:8000" ,
227+ TargetDestination : "192.168.1.100:8000" ,
226228 },
227229 wantMutatedBodyModel : model ,
228230 },
@@ -243,7 +245,7 @@ func TestDirector_HandleRequest(t *testing.T) {
243245 NamespacedName : types.NamespacedName {Namespace : "default" , Name : "pod1" },
244246 Address : "192.168.1.100" ,
245247 },
246- TargetEndpoint : "192.168.1.100:8000" ,
248+ TargetDestination : "192.168.1.100:8000" ,
247249 },
248250 wantMutatedBodyModel : modelSheddable ,
249251 },
@@ -264,7 +266,7 @@ func TestDirector_HandleRequest(t *testing.T) {
264266 NamespacedName : types.NamespacedName {Namespace : "default" , Name : "pod1" },
265267 Address : "192.168.1.100" ,
266268 },
267- TargetEndpoint : "192.168.1.100:8000" ,
269+ TargetDestination : "192.168.1.100:8000" ,
268270 },
269271 wantMutatedBodyModel : "resolved-target-model-A" ,
270272 },
@@ -280,7 +282,7 @@ func TestDirector_HandleRequest(t *testing.T) {
280282 NamespacedName : types.NamespacedName {Namespace : "default" , Name : "pod1" },
281283 Address : "192.168.1.100" ,
282284 },
283- TargetEndpoint : "192.168.1.100:8000" ,
285+ TargetDestination : "192.168.1.100:8000" ,
284286 },
285287 wantMutatedBodyModel : "food-review-1" ,
286288 reqBodyMap : map [string ]interface {}{
@@ -384,7 +386,7 @@ func TestDirector_HandleRequest(t *testing.T) {
384386 assert .Equal (t , test .wantReqCtx .ResolvedTargetModel , returnedReqCtx .ResolvedTargetModel ,
385387 "reqCtx.ResolvedTargetModel mismatch" )
386388 assert .Equal (t , test .wantReqCtx .TargetPod , returnedReqCtx .TargetPod , "reqCtx.TargetPod mismatch" )
387- assert .Equal (t , test .wantReqCtx .TargetEndpoint , returnedReqCtx .TargetEndpoint , "reqCtx.TargetEndpoint mismatch" )
389+ assert .Equal (t , test .wantReqCtx .TargetDestination , returnedReqCtx .TargetDestination , "reqCtx.TargetEndpoint mismatch" )
388390 }
389391
390392 if test .wantMutatedBodyModel != "" {
0 commit comments