2017-02-10 03:52:50 +00:00
|
|
|
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)
|
2017-02-28 23:10:56 +00:00
|
|
|
ParallelTest(t, []Version{{Image: "docker_image:9.6"}}, isReady,
|
2017-02-10 03:52:50 +00:00
|
|
|
func(t *testing.T, i Instance) {
|
|
|
|
// Run your test/s ...
|
|
|
|
t.Fatal("...")
|
|
|
|
})
|
|
|
|
}
|