mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
changing UpdateEndpointsMap to Update
changing UpdateEndpointsMap to be a function of the EndpointsMap object
This commit is contained in:
@@ -1213,7 +1213,7 @@ func TestUpdateEndpointsMap(t *testing.T) {
|
||||
fp.addEndpoints(tc.previousEndpoints[i])
|
||||
}
|
||||
}
|
||||
UpdateEndpointsMap(fp.endpointsMap, fp.endpointsChanges)
|
||||
fp.endpointsMap.Update(fp.endpointsChanges)
|
||||
compareEndpointsMaps(t, tci, fp.endpointsMap, tc.oldEndpoints)
|
||||
|
||||
// Now let's call appropriate handlers to get to state we want to be.
|
||||
@@ -1233,7 +1233,7 @@ func TestUpdateEndpointsMap(t *testing.T) {
|
||||
fp.updateEndpoints(prev, curr)
|
||||
}
|
||||
}
|
||||
result := UpdateEndpointsMap(fp.endpointsMap, fp.endpointsChanges)
|
||||
result := fp.endpointsMap.Update(fp.endpointsChanges)
|
||||
newMap := fp.endpointsMap
|
||||
compareEndpointsMaps(t, tci, newMap, tc.expectedResult)
|
||||
if len(result.StaleEndpoints) != len(tc.expectedStaleEndpoints) {
|
||||
@@ -1373,7 +1373,7 @@ func TestLastChangeTriggerTime(t *testing.T) {
|
||||
|
||||
tc.scenario(fp)
|
||||
|
||||
result := UpdateEndpointsMap(fp.endpointsMap, fp.endpointsChanges)
|
||||
result := fp.endpointsMap.Update(fp.endpointsChanges)
|
||||
got := result.LastChangeTriggerTimes
|
||||
sortTimeSlice(got)
|
||||
sortTimeSlice(tc.expected)
|
||||
|
||||
Reference in New Issue
Block a user