mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Remove reflect.DeepEqual for defaultpreemption, helper, and imagelocality package
This commit is contained in:
@@ -20,7 +20,6 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"reflect"
|
||||
"sort"
|
||||
"strings"
|
||||
"testing"
|
||||
@@ -302,11 +301,11 @@ func TestPostFilter(t *testing.T) {
|
||||
}
|
||||
|
||||
gotResult, gotStatus := p.PostFilter(context.TODO(), state, tt.pod, tt.filteredNodesStatuses)
|
||||
if !reflect.DeepEqual(gotStatus, tt.wantStatus) {
|
||||
t.Errorf("Status does not match: %v, want: %v", gotStatus, tt.wantStatus)
|
||||
if diff := cmp.Diff(tt.wantStatus, gotStatus); diff != "" {
|
||||
t.Errorf("Unexpected status (-want, +got):\n%s", diff)
|
||||
}
|
||||
if diff := cmp.Diff(gotResult, tt.wantResult); diff != "" {
|
||||
t.Errorf("Unexpected postFilterResult (-want, +got): %s", diff)
|
||||
if diff := cmp.Diff(tt.wantResult, gotResult); diff != "" {
|
||||
t.Errorf("Unexpected postFilterResult (-want, +got):\n%s", diff)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user