fix(timezone): the timezone is standardized to UTC
Signed-off-by: cndoit18 <cndoit18@outlook.com>
This commit is contained in:
@@ -235,7 +235,7 @@ func TestSyncServicePodSelection(t *testing.T) {
|
||||
assert.Len(t, slices.Items, 1, "Expected 1 endpoint slices")
|
||||
slice := slices.Items[0]
|
||||
assert.Len(t, slice.Endpoints, 1, "Expected 1 endpoint in first slice")
|
||||
assert.NotEmpty(t, slice.Annotations["endpoints.kubernetes.io/last-change-trigger-time"])
|
||||
assert.NotEmpty(t, slice.Annotations[v1.EndpointsLastChangeTriggerTime])
|
||||
endpoint := slice.Endpoints[0]
|
||||
assert.EqualValues(t, endpoint.TargetRef, &v1.ObjectReference{Kind: "Pod", Namespace: ns, Name: pod1.Name})
|
||||
}
|
||||
@@ -1064,7 +1064,7 @@ func TestSyncService(t *testing.T) {
|
||||
|
||||
// ensure all attributes of endpoint slice match expected state
|
||||
slice := sliceList.Items[0]
|
||||
assert.Equal(t, slice.Annotations["endpoints.kubernetes.io/last-change-trigger-time"], creationTimestamp.Format(time.RFC3339Nano))
|
||||
assert.Equal(t, slice.Annotations[v1.EndpointsLastChangeTriggerTime], creationTimestamp.UTC().Format(time.RFC3339Nano))
|
||||
assert.ElementsMatch(t, testcase.expectedEndpointPorts, slice.Ports)
|
||||
assert.ElementsMatch(t, testcase.expectedEndpoints, slice.Endpoints)
|
||||
})
|
||||
|
Reference in New Issue
Block a user