Skip to content

test: add coverage for cluster provider detection - #1987

Open
magic-peach wants to merge 1 commit into
projectsveltos:mainfrom
magic-peach:test/telemetry-detect-cluster-provider
Open

magic-peach wants to merge 1 commit into
projectsveltos:mainfrom
magic-peach:test/telemetry-detect-cluster-provider

Conversation

@magic-peach

Copy link
Copy Markdown

detectClusterProvider in internal/telemetry/report.go had no test coverage, this package has zero test files. It detects the cluster provider through node labels, the ProviderID prefix, kubelet version substrings, and a hostname fallback for kind. Added report_test.go with a table of cases covering each detection path, the label over providerID precedence, and the unknown fallback. Verified with go build, go vet and go test, 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