I have setup a test suite for my struct (https://github.com/stretchr/testify#suite-package). Before I was able to run a single test by specifying just a pattern:
go test -v ./services/gateways/... -run mytest
This approach doesn't work after conversion. Bad luck or is there a way?
You can run single methods by specifying the
-testify.m
argument.to run this suite method the command is:
go test -v github.com/vektra/mockery/mockery -run ^TestGeneratorSuite$ -testify.m TestGenerator
i think you're SOL with that package but here's a similar approach with go 1.7's stock testing tools:
Example output for one suite:
Example output for one test: