github.com/mponton/terratest@v0.44.0/modules/testing/types.go (about) 1 package testing 2 3 // TestingT is an interface that describes the implementation of the testing object 4 // that the majority of Terratest functions accept as first argument. 5 // Using an interface that describes testing.T instead of the actual implementation 6 // makes terratest usable in a wider variety of contexts (e.g. use with ginkgo : https://godoc.org/github.com/onsi/ginkgo#GinkgoT) 7 type TestingT interface { 8 //Fail marks the function as having failed but continues execution. 9 Fail() 10 // FailNow marks the function as having failed and stops its execution 11 // by calling runtime.Goexit (which then runs all deferred calls in the 12 // current goroutine). 13 // Execution will continue at the next test or benchmark. 14 // FailNow must be called from the goroutine running the 15 // test or benchmark function, not from other goroutines 16 // created during the test. Calling FailNow does not stop 17 // those other goroutines. 18 FailNow() 19 Fatal(args ...interface{}) 20 // Fatalf is equivalent to Logf followed by FailNow. 21 Fatalf(format string, args ...interface{}) 22 // Error is equivalent to Log followed by Fail. 23 Error(args ...interface{}) 24 // Errorf is equivalent to Logf followed by Fail. 25 Errorf(format string, args ...interface{}) 26 // Name returns the name of the running test or benchmark. 27 Name() string 28 }