github.com/lazarenkoa/migrate@v3.5.4+incompatible/testing/testing_test.go (about)

     1  package testing
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func ExampleParallelTest(t *testing.T) {
     8  	var isReady = func(i Instance) bool {
     9  		// Return true if Instance is ready to run tests.
    10  		// Don't block here though.
    11  		return true
    12  	}
    13  
    14  	// t is *testing.T coming from parent Test(t *testing.T)
    15  	ParallelTest(t, []Version{{Image: "docker_image:9.6"}}, isReady,
    16  		func(t *testing.T, i Instance) {
    17  			// Run your test/s ...
    18  			t.Fatal("...")
    19  		})
    20  }