Repository navigation
Conversation
…ces as Names
subenum report: -results as one JSON array (with the summary as its last
element) gives the same report as the JSONL file, a '{bad' -results file
fails with 'reading -results file', and a '{}' -stats file fails with
'not a subenum -stats report'.
pkg/subenum: ZoneTransfer(opts).Names and NSECWalk(opts).Names called
directly return the zone's names against the local test server; a refused
transfer gives no names and no error, and bad options are errors.
Refs TMHSDigital#486
This branch has not been deployed
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.
Description
Adds the tests still open in #486 after b4fda54. Tests only; no production code changes.
internal/cli/runreport_test.goTestReportResultsJSONArray: the degraded fixture's results written as one JSON array (summary as the last element) gives exactlydegraded/want.md, the same report as the JSONL file.TestReportErrors: two new cases: a-resultsfile containing{badexits 1 with "reading -results file", and a-statsfile containing{}exits 1 with "not a subenum -stats report". Nothing goes to stdout in either case.pkg/subenum/zone_test.goTestZoneSourceNames:ZoneTransfer(opts).Namesreturns[admin-legacy www]from the local zone server. A refused transfer gives no names and no error, and a bad resolver is an error.NSECWalk(opts).Namesreturns[admin-legacy ns1 secret]from the plain-NSEC lab zone without sending AXFR, and a negativeRateis an error.go tool covernow showszoneSource.NamesandwalkSource.Namesinpkg/subenum/zone.goat 100%.Related Issue
Closes #486
Type of Change
Checklist
go test -race -shuffle=on -count=1 ./...)Ethical Considerations
Additional Information
Also ran gofmt,
go vet, and golangci-lint v2.15.0 on./internal/cli/...and./pkg/subenum/...(0 issues).This change was prepared with AI assistance; I reviewed the diff and ran the checks above.