Software architecture · Go · Distributed systems

Calvin Lobo

Backend engineer. I build systems that scale, and write about the decisions behind them.

Scroll

Latest writing

All posts →
NewestOct 1, 2022 · 9 min read

Testing complex workflows in Go

A testify/suite style that keeps sophisticated fixtures, mocks, edge cases and complex outputs readable as the test cases multiply.

Read the article →
// Before every test, fresh mocks and fixtures
func (s *CollectorSuite) SetupTest() {
    s.mocks = Mocks{}
    s.fix = Fixtures{input: happyPath()}
    s.expect = Expectations{}
}

func (s *CollectorSuite) TestRateLimited() {
    s.mocks.ListUGC(Fail)
    s.run()
}

Topics

Calvin LoboBackend engineer focused on software architecture, scalability and developer efficiency. Outside of work: electric guitar, home renovation and time outdoors.

Prefer a feed reader? Subscribe via RSS