Refactor diff into sub pkg

This commit is contained in:
harry
2016-03-11 10:43:55 +08:00
committed by Harry Zhang
parent d6e1566509
commit b0900bf0d4
36 changed files with 92 additions and 85 deletions

View File

@@ -25,7 +25,7 @@ import (
apitesting "k8s.io/kubernetes/pkg/api/testing"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/util"
"k8s.io/kubernetes/pkg/util/diff"
)
func testEvent(name string) *api.Event {
@@ -65,7 +65,7 @@ func TestGetAttrs(t *testing.T) {
t.Fatalf("Unexpected error %v", err)
}
if e, a := label, (labels.Set{}); !reflect.DeepEqual(e, a) {
t.Errorf("diff: %s", util.ObjectDiff(e, a))
t.Errorf("diff: %s", diff.ObjectDiff(e, a))
}
expect := fields.Set{
"metadata.name": "f0118",
@@ -82,7 +82,7 @@ func TestGetAttrs(t *testing.T) {
"type": api.EventTypeNormal,
}
if e, a := expect, field; !reflect.DeepEqual(e, a) {
t.Errorf("diff: %s", util.ObjectDiff(e, a))
t.Errorf("diff: %s", diff.ObjectDiff(e, a))
}
}