Create a gist now

Instantly share code, notes, and snippets.

@clairew /example_test_main.go Secret
Last active Aug 9, 2018

Embed
What would you like to do?
Go Test Runner Example
func TestMain(m *testing.M) {
TestSetup() // logic to set up necessary work before running test suite
exitCode := m.Run() // run the tests and keep track of exit code
TestTearDown(exitCode) // teardown logic
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment