Merge pull request #108936 from stevekuznetsov/skuznets/more-correct-diff

pkg/storage/etcd3: use correct diff in tests
This commit is contained in:
Kubernetes Prow Robot 2022-03-24 02:59:26 -07:00 committed by GitHub
commit efdb80dcc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,6 @@ import (
"testing"
"time"
"github.com/google/go-cmp/cmp"
clientv3 "go.etcd.io/etcd/client/v3"
"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)
return
}
if diff := cmp.Diff(expectObj, res.Object); diff != "" {
t.Errorf("incorrect obj: %s", diff)
}
expectNoDiff(t, "incorrect obj", expectObj, res.Object)
case <-time.After(wait.ForeverTestTimeout):
t.Errorf("time out after waiting %v on ResultChan", wait.ForeverTestTimeout)
}