~/talk

Climbing the Testing Pyramid: From Real Service to Interface Mocks in Go

Talkat GopherCon UK 2025 · 2025-08-13..08-15· [testing, go]
links:none on file
slides:none on file

Tests target an S3-bucket-creation function with retry logic and show concrete setups: proxying real AWS through Toxiproxy to inject a 30s latency toxic, running against a local emulator via LocalStack, and using Go’s httptest plus TLS-capable clients for HTTP mocks. Interface-based mocks are demonstrated with call-count logic and generated mocks from Mockery that return errors twice then succeed on the third call; all demos run and validate retries and cleanup.

AI-written summary · about

  1. 0:00Testing cloud dependencies
  2. 3:32Real cloud services testing
  3. 7:44Failures with ToxiProxy
  4. 17:18Validating retries through log inspection
  5. 21:35Service emulators like LocalStack
  6. 29:59Emulator limitations
  7. 30:41HTTP test mocking
  8. 37:02Closed-source dependency challenges
  9. 38:06Interface mocks in Go
  10. 44:34Mockery for mock generation
  11. 47:25Choosing testing strategy
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.