github.com/onsi/ginkgo@v1.16.6-0.20211118180735-4e1925ba4c95/integration/_fixtures/abort_fixture/abort_fixture_suite_test.go (about) 1 package abort_fixture_test 2 3 import ( 4 "testing" 5 "time" 6 7 . "github.com/onsi/ginkgo" 8 . "github.com/onsi/gomega" 9 ) 10 11 func TestAbortFixture(t *testing.T) { 12 RegisterFailHandler(Fail) 13 RunSpecs(t, "AbortFixture Suite") 14 } 15 16 var _ = Describe("top-level container", func() { 17 It("runs and passes", func() {}) 18 It("aborts", func() { 19 time.Sleep(time.Second) 20 AbortSuite("this suite needs to end now!") 21 }) 22 It("never runs", func() { 23 time.Sleep(time.Hour) 24 Fail("SHOULD NOT SEE THIS") 25 }) 26 It("never runs either", func() { 27 time.Sleep(time.Hour) 28 Fail("SHOULD NOT SEE THIS") 29 }) 30 })