Problem
internal/gh (wraps gh repo list and gh api) and internal/docker (wraps docker compose up/down/build) have zero test files. While they're thin wrappers over external CLIs, they contain output parsing logic that could break silently if the CLI output format changes.
Lower priority than internal/devlake tests (#96) but still valuable for catching regressions during refactoring.
Scope of Changes
internal/gh/gh_test.go
- Test
ListRepos output parsing (newline-separated nameWithOwner)
- Test
GetRepoDetails JSON parsing
- Test
IsAvailable with/without gh in PATH (may need test helper)
internal/docker/docker_test.go
- Test command construction for
ComposeUp, ComposeDown, Build
- Test that service list is passed correctly
- Test that
--build flag is included when build=true
Note: These tests should validate command construction and output parsing, not actually invoke Docker/gh (which would require those tools to be installed).
Acceptance Criteria
Problem
internal/gh(wrapsgh repo listandgh api) andinternal/docker(wrapsdocker compose up/down/build) have zero test files. While they're thin wrappers over external CLIs, they contain output parsing logic that could break silently if the CLI output format changes.Lower priority than
internal/devlaketests (#96) but still valuable for catching regressions during refactoring.Scope of Changes
internal/gh/gh_test.goListReposoutput parsing (newline-separated nameWithOwner)GetRepoDetailsJSON parsingIsAvailablewith/without gh in PATH (may need test helper)internal/docker/docker_test.goComposeUp,ComposeDown,Build--buildflag is included whenbuild=trueNote: These tests should validate command construction and output parsing, not actually invoke Docker/gh (which would require those tools to be installed).
Acceptance Criteria
go test ./internal/gh/...passesgo test ./internal/docker/...passesgo build ./...andgo vet ./...pass