github.com/kubecost/golang-migrate-duckdb/v4@v4.17.0-duckdb.1/testing/testing_test.go (about)

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