Created
April 2, 2021 17:48
-
-
Save sagikazarmark/b7979797d9f9074d373bb4d1241d798b to your computer and use it in GitHub Desktop.
Go integration tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
func TestIntegration(t *testing.T) { | |
if m := flag.Lookup("test.run").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 | |
testIntegration(t) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment