fix null lastTransitionTime in pod condition when setting scheduling gate
This commit is contained in:
@@ -371,7 +371,10 @@ func TestWaitingForGatesCondition(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
if diff := cmp.Diff(tt.want, got); diff != "" {
|
||||
if got.LastTransitionTime.IsZero() && got.Type != "" {
|
||||
t.Errorf("unexpected empty LastTransitionTime in condition")
|
||||
}
|
||||
if diff := cmp.Diff(tt.want, got, cmpopts.IgnoreFields(api.PodCondition{}, "LastTransitionTime")); diff != "" {
|
||||
t.Errorf("unexpected field errors (-want, +got):\n%s", diff)
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user