Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Go integration tests
package main
func TestIntegration(t *testing.T) {
if m := flag.Lookup("").Value.String(); m == "" || !regexp.MustCompile(m).MatchString(t.Name()) {
t.Skip("skipping integration test as execution was not requested explicitly using go test -run")
t.Run("testCase", testCase)
// or
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment