...
Package dktesting
func ParallelTest(t *testing.T, specs []ContainerSpec,
testFunc func(*testing.T, dktest.ContainerInfo))
ParallelTest runs Docker tests in parallel
▾ Example
Code:
t := &testing.T{}
var isReady = func(ctx context.Context, c dktest.ContainerInfo) bool {
return true
}
dktesting.ParallelTest(t, []dktesting.ContainerSpec{{ImageName: "docker_image:9.6",
Options: dktest.Options{ReadyFunc: isReady}}}, func(t *testing.T, c dktest.ContainerInfo) {
t.Fatal("...")
})
ContainerSpec holds Docker testing setup specifications
type ContainerSpec struct {
ImageName string
Options dktest.Options
}