Skip to content

Improve test coverage for buildinfo and webui packages #695

@aaronbrethorst

Description

@aaronbrethorst

Summary

Two packages have insufficient test coverage:

  • internal/buildinfo/ — 0% coverage, no test file exists
  • internal/webui/ — 53.5% coverage, has some tests but significant gaps

Acceptance criteria

  • Create internal/buildinfo/buildinfo_test.go with tests for the package
  • Identify untested code paths in internal/webui/ and add tests to bring coverage above 80%
  • Follow existing test patterns in the repo (table-driven tests, testify assertions)
  • make test passes
  • make lint passes

Context

  • internal/buildinfo/ is a small package that stores build metadata variables — a great starting point for writing a first Go test file
  • internal/webui/ has 5 source files and 4 existing test files; examine the existing tests in index_handler_test.go, debug_index_handler_test.go, static_handler_test.go, and webui_coverage_test.go for patterns to follow
  • Use make coverage to generate an HTML coverage report and identify specific uncovered lines

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomers to the codebase

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions