migrate/testing/testing_test.go
Dale Hui 43e4503343 Update golangci-lint config and implore contributors to use it
- Run golangci-lint on tests and fix found issues
2019-03-28 18:55:12 -07:00

21 lines
446 B
Go

package testing
import (
"testing"
)
func ExampleParallelTest(t *testing.T) { // nolint:govet
var isReady = func(i Instance) bool {
// Return true if Instance is ready to run tests.
// Don't block here though.
return true
}
// t is *testing.T coming from parent Test(t *testing.T)
ParallelTest(t, []Version{{Image: "docker_image:9.6"}}, isReady,
func(t *testing.T, i Instance) {
// Run your test/s ...
t.Fatal("...")
})
}