Skip to content

Commit 766b1de

Browse files
committed
REVISIT/TODO: fix-test: semantic equality for pkg/deploy roundtrip tests
1 parent 3439803 commit 766b1de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/deploy/api/v1/defaults_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,8 @@ func TestDefaults(t *testing.T) {
557557
t.Errorf("unexpected object: %v", got)
558558
t.FailNow()
559559
}
560-
if !reflect.DeepEqual(got.Spec, expected.Spec) {
560+
// TODO(rebase): check that there are no fields which have different semantics for nil and []
561+
if !kapi.Semantic.DeepEqual(got.Spec, expected.Spec) {
561562
t.Errorf("got different than expected:\nA:\t%#v\nB:\t%#v\n\nDiff:\n%s\n\n%s", got, expected, diff.ObjectDiff(expected, got), diff.ObjectGoPrintSideBySide(expected, got))
562563
}
563564
}

0 commit comments

Comments
 (0)