Skip to content

test: add coverage for SortedCorev1ObjectReference - #1988

Open
magic-peach wants to merge 1 commit into
projectsveltos:mainfrom
magic-peach:test/sort-corev1-object-reference
Open

magic-peach wants to merge 1 commit into
projectsveltos:mainfrom
magic-peach:test/sort-corev1-object-reference

Conversation

@magic-peach

Copy link
Copy Markdown

SortedCorev1ObjectReference in controllers/dependencymanager/sort_v1reference.go had no test coverage. It implements sort.Interface for corev1.ObjectReference slices, ordering by Kind then Namespace then Name. Added sort_v1reference_test.go covering full ordering across all three tie break levels, an empty and single element no op case, and the Len and Swap methods directly. Verified with go build, go vet and the full envtest suite, all passing.

Signed-off-by: Akanksha Trehun <akankshatrehun@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant