diff --git a/checkers/testdata/deprecatedComment/negative_tests.go b/checkers/testdata/deprecatedComment/negative_tests.go index d0f311c9c..41989223e 100644 --- a/checkers/testdata/deprecatedComment/negative_tests.go +++ b/checkers/testdata/deprecatedComment/negative_tests.go @@ -31,3 +31,26 @@ var ( // dePreca _ = 0 ) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ComponentStatus (and ComponentStatus) holds the cluster validation info. +// Deprecated: This API is deprecated in v1.19+ +type ComponentStatus struct { + foo string + // +optional + bar string + + // +optional + fooBard []string +} + +// ComponentStatusList represents the list of component statuses +// Deprecated: This API is deprecated in v1.19+ +type ComponentStatusList struct { + string + // +optional + int + + Items []ComponentStatus +} diff --git a/checkers/testdata/deprecatedComment/positive_tests.go b/checkers/testdata/deprecatedComment/positive_tests.go index e5a31433d..28d77ead5 100644 --- a/checkers/testdata/deprecatedComment/positive_tests.go +++ b/checkers/testdata/deprecatedComment/positive_tests.go @@ -181,3 +181,28 @@ type foo3 string /*! the proper format is `Deprecated: ` */ // deprecated in 1.11: use f instead. type foo4 string + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ComponentStatusBad (and ComponentStatusList) holds the cluster validation info. +/*! use `Deprecated: ` (note the casing) instead of `DeprecaTEd: ` */ +// DeprecaTEd: This API is deprecated in v1.19+ +type ComponentStatusBad struct { + foo string + // +optional + bar string + + // +optional + fooBard []string +} + +// ComponentStatusList represents the list of component statuses +/*! use `Deprecated: ` (note the casing) instead of `DeprecaTed: ` */ +// DeprecaTed: This API is deprecated in v1.19+ +type ComponentStatusListBad struct { + string + // +optional + int + + Items []int +}