Repository navigation
test: cover pkg/dns (→39.5%) and pkg/provider (→24.0%) - #6
Merged
Merged
Conversation
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.
This was referenced May 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second spawn coverage pass (#3) — two more packages.
Coverage
pkg/dnspkg/providerCI 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 theRegisterDNS/RegisterJobArrayDNSname-validation rejection paths. (Note: names are lowercased before regex validation, so the tests use characters outside[a-z0-9-]to trigger rejection.)pkg/provider —
EC2Providerdriven by a substrate EC2 client:GetIdentity,GetConfig,Terminate,Stop,Hibernate(incl. its Stop fallback), and theDiscoverPeersquery 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%.