From 2029bba6348a80f615e1c0224ec776d93069ea1b Mon Sep 17 00:00:00 2001 From: Ben Luddy Date: Tue, 25 Jun 2024 21:12:54 -0400 Subject: [PATCH] Remove temporary mechanism for skipping CBOR tests. The CBOR decode and "appendix a" unit tests cover specific serialization behaviors that were known to be incomplete at the time. Now that all of those cases have been addressed, the mechanism for skipping those tests can be removed. --- .../serializer/cbor/internal/modes/appendixa_test.go | 8 -------- .../serializer/cbor/internal/modes/decode_test.go | 12 ------------ 2 files changed, 20 deletions(-) diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/appendixa_test.go b/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/appendixa_test.go index 50f6d648fab..52c3f0a5d32 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/appendixa_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/appendixa_test.go @@ -69,10 +69,6 @@ func TestAppendixA(t *testing.T) { reject string // reason the decoder rejects the example encoded []byte // re-encoded object (only if different from example encoding) reasons []string // reasons for re-encode difference - - // TODO: The cases with nonempty fixme are known to be not working and fixing them - // is an alpha criteria. They're present and skipped for visibility. - fixme string }{ { example: hex("00"), @@ -558,10 +554,6 @@ func TestAppendixA(t *testing.T) { }, } { t.Run(fmt.Sprintf("%x", tc.example), func(t *testing.T) { - if tc.fixme != "" { - t.Skip(tc.fixme) // TODO: Remove once all cases are fixed. - } - var decoded interface{} err := modes.Decode.Unmarshal(tc.example, &decoded) if err != nil { diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/decode_test.go b/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/decode_test.go index cd516803946..4dbce81b44d 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/decode_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/decode_test.go @@ -45,11 +45,6 @@ func TestDecode(t *testing.T) { into interface{} // prototype for concrete destination type. if nil, decode into empty interface value. want interface{} assertOnError func(t *testing.T, e error) - - // TODO: Some failing test cases are included for completeness. The next library - // minor version should allow them all to be fixed. In the meantime, this field - // explains the behavior reason for a particular failure. - fixme string } // Test cases are grouped by the kind of the CBOR data item being decoded, as enumerated in @@ -70,13 +65,6 @@ func TestDecode(t *testing.T) { } t.Run(fmt.Sprintf("%s/mode=%s", test.name, modeName), func(t *testing.T) { - if test.fixme != "" { - // TODO: Remove this along with the - // fixme field when the last skipped - // test case is passing. - t.Skip(test.fixme) - } - var dst reflect.Value if test.into == nil { var i interface{}