Skip to content

test: cover pkg/dns (→39.5%) and pkg/provider (→24.0%) - #6

Merged
scttfrdmn merged 1 commit into
mainfrom
test/dns-provider-coverage
May 30, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
test/dns-provider-coverage

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Second spawn coverage pass (#3) — two more packages.

Coverage

Package Before After
pkg/dns 15.3% 39.5%
pkg/provider 11.9% 24.0%
aggregate 25.7% 26.1%

CI ratchet floor raised 24 → 25.

What's tested

pkg/dns — white-box tests of the DNS API client using httptest: callAPI (success, API-error surfaced, malformed JSON, unreachable endpoint), GetFQDN (both the method and the package function), GetAccountSubdomain, and the RegisterDNS/RegisterJobArrayDNS name-validation rejection paths. (Note: names are lowercased before regex validation, so the tests use characters outside [a-z0-9-] to trigger rejection.)

pkg/provider — EC2Provider driven by a substrate EC2 client: GetIdentity, GetConfig, Terminate, Stop, Hibernate (incl. its Stop fallback), and the DiscoverPeers query path (empty-array short-circuit + describe path).

Verification

go build, go vet, gofmt, golangci-lint (changed files clean), package tests pass. Gate validated: 26.1% ≥ 25%.

pkg/dns 15.3% → 39.5%: white-box tests for the DNS API client via httptest —
callAPI (success / API-error / malformed-response / unreachable-endpoint),
GetFQDN (method + package func), GetAccountSubdomain, and RegisterDNS /
RegisterJobArrayDNS name-validation rejection paths.

pkg/provider 11.9% → 24.0%: EC2Provider via a substrate EC2 client —
GetIdentity, GetConfig, Terminate, Stop, Hibernate, and the DiscoverPeers
query path (empty-array short-circuit + describe path).

Aggregate spawn coverage 25.7% → 26.1%. CI ratchet floor raised 24 → 25.
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