github.com/wanddynosios/cli/v8@v8.7.9-0.20240221182337-1a92e3a7017f/api/plugin/wrapper/wrapper_suite_test.go (about) 1 package wrapper_test 2 3 import ( 4 "bytes" 5 "log" 6 7 . "github.com/onsi/ginkgo" 8 . "github.com/onsi/gomega" 9 . "github.com/onsi/gomega/ghttp" 10 11 "testing" 12 ) 13 14 func TestPlugin(t *testing.T) { 15 RegisterFailHandler(Fail) 16 RunSpecs(t, "Wrapper Suite") 17 } 18 19 var server *Server 20 21 var _ = SynchronizedBeforeSuite(func() []byte { 22 return []byte{} 23 }, func(data []byte) { 24 server = NewTLSServer() 25 26 // Suppresses ginkgo server logs 27 server.HTTPTestServer.Config.ErrorLog = log.New(&bytes.Buffer{}, "", 0) 28 }) 29 30 var _ = SynchronizedAfterSuite(func() { 31 server.Close() 32 }, func() {}) 33 34 var _ = BeforeEach(func() { 35 server.Reset() 36 })