Skip to content

Add unit tests for modules/pihole (0% to 92% coverage) - #2160

Open
Seanstoppable wants to merge 3 commits into
wtfutil:trunkfrom
Seanstoppable:seanstoppable-pihole-test-coverage
Open

Add unit tests for modules/pihole (0% to 92% coverage)#2160
Seanstoppable wants to merge 3 commits into
wtfutil:trunkfrom
Seanstoppable:seanstoppable-pihole-test-coverage

Conversation

@Seanstoppable

Copy link
Copy Markdown
Collaborator

Adds table-driven and httptest-based unit tests for modules/pihole, raising statement coverage from 0% to 92%. Covers client.go, view.go, widget.go, and settings.go. Documented a pre-existing padding bug in sortMapByIntVal/sortMapByFloatVal (tests assert actual behavior since scope is coverage-only). Ran golangci-lint run ./modules/pihole/... - no real issues; remaining gofmt warnings are pre-existing CRLF artifacts unrelated to this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant