Skip to content

test: add coverage for show classifier-labels command - #452

Open
magic-peach wants to merge 1 commit into
projectsveltos:mainfrom
magic-peach:test/classifier-labels-coverage
Open

magic-peach wants to merge 1 commit into
projectsveltos:mainfrom
magic-peach:test/classifier-labels-coverage

Conversation

@magic-peach

Copy link
Copy Markdown

show classifier-labels (added in #437) had no test coverage: buildClassifierLabelMap, buildMCCLabelMap, displayClassifierLabels, displayManagedLabels, displayConflicts, appendConflictRows and matchesCluster were all untested.

Adds tests covering the managed-labels table across both Classifier and ManagementClusterClassifier reports, namespace/cluster filtering, and the --warnings conflict-only path, following the same fake-client pattern already used in addons_test.go and admin_rbacs_test.go.

go build ./..., go vet ./internal/commands/show/... and go test ./internal/commands/show/... all pass.

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