Skip to content

test: add unit tests for config, repoapi, and workflowapi clients - #10

Closed
rawen554 wants to merge 2 commits into
mainfrom
rep-514-unit-tests
Closed

rawen554 wants to merge 2 commits into
mainfrom
rep-514-unit-tests

Conversation

@rawen554

Copy link
Copy Markdown
Collaborator

Summary

  • internal/config: precedence in Load() (defaults → file → env), EDS_CONFIG tilde-expansion, Save()/Load() round-trip incl. 0600 permissions.
  • internal/repoapi and internal/workflowapi: APIError mapping (error/message/errors response shapes, empty body) and request-id header capture, exercised through Do() against httptest.Server.

No _test.go files existed anywhere in the repo before this (make test was a no-op since the initial commit).

REP-514

Test plan

  • go build ./...
  • go vet ./...
  • go test ./... (21 tests, all passing)
  • gofmt -l clean on the new files

Roman Komarov added 2 commits August 18, 2026 10:05
Covers config.Load()'s precedence (defaults -> file -> env, including
EDS_CONFIG tilde-expansion) and Save()/Load() round-tripping, plus each
API client's APIError mapping (error/message/errors response shapes,
empty body, request-id header capture) exercised through Do() against
httptest.Server.

REP-514
golangci-lint's revive (unused-parameter) flagged the httptest handler
closures that don't reference their *http.Request argument.
@rawen554 rawen554 closed this Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant