mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
pkg/storage/etcd3: use correct diff in tests
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
This commit is contained in:
parent
75b19b242c
commit
8903372e8b
@ -23,7 +23,6 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/google/go-cmp/cmp"
|
|
||||||
clientv3 "go.etcd.io/etcd/client/v3"
|
clientv3 "go.etcd.io/etcd/client/v3"
|
||||||
|
|
||||||
"k8s.io/apimachinery/pkg/api/apitesting"
|
"k8s.io/apimachinery/pkg/api/apitesting"
|
||||||
@ -390,9 +389,7 @@ func testCheckResult(t *testing.T, expectEventType watch.EventType, w watch.Inte
|
|||||||
t.Errorf("event type want=%v, get=%v", expectEventType, res.Type)
|
t.Errorf("event type want=%v, get=%v", expectEventType, res.Type)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if diff := cmp.Diff(expectObj, res.Object); diff != "" {
|
expectNoDiff(t, "incorrect obj", expectObj, res.Object)
|
||||||
t.Errorf("incorrect obj: %s", diff)
|
|
||||||
}
|
|
||||||
case <-time.After(wait.ForeverTestTimeout):
|
case <-time.After(wait.ForeverTestTimeout):
|
||||||
t.Errorf("time out after waiting %v on ResultChan", wait.ForeverTestTimeout)
|
t.Errorf("time out after waiting %v on ResultChan", wait.ForeverTestTimeout)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user