Skip to content

v1.6.1

Latest

Choose a tag to compare

@steinfletcher steinfletcher released this 03 Sep 11:35
· 8 commits to master since this release
2e759b8

Maintenance release. No changes to the exported API or to documented behaviour. See #167 for the full commit-by-commit history.

Bug fixes

  • Failure messages are no longer dropped for tests created without a name.
  • Mock responses no longer share the mock's header map, so AnyTimes mocks stop accumulating duplicate Set-Cookie headers and no longer race under concurrent calls.
  • Result.UnmatchedMocks() returns every unmatched mock instead of only the first.
  • BasicAuth keeps passwords that contain :.
  • Request builder errors (BodyFromFile, JSON, MultipartFile, …) fail the test from Expect(t) instead of panicking with a nil pointer.
  • Sequence diagrams no longer corrupt host names that contain cli or sut.
  • Concurrent mock interactions are captured safely when reporting, and the diagram file is closed after writing.
  • Mock.copy() and copyHttpResponse no longer share state with the original.

Internal

  • io/ioutil replaced, interface{} → any, errors.Is/As, maps/slices helpers.
  • apitest.go and mocks.go split into smaller files by responsibility.
  • golangci-lint configuration, -race in make test, CI matrix on Go 1.23 and stable.
  • New tests for mocks/verifier and x/db.

Docs

  • README section on how mocks are matched; the sequence diagram example now uses SequenceDiagram.
  • InboundRequest and FinalResponse are marked deprecated (unused, retained for compatibility).

Supersedes #166. Thanks @alingse.