mirror of https://github.com/status-im/migrate.git
21 lines
420 B
Go
21 lines
420 B
Go
|
package testing
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func ExampleParallelTest(t *testing.T) {
|
||
|
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, []string{"docker_image:9.6"}, isReady,
|
||
|
func(t *testing.T, i Instance) {
|
||
|
// Run your test/s ...
|
||
|
t.Fatal("...")
|
||
|
})
|
||
|
}
|