package remote_test import ( "encoding/json" . "github.com/innotech/hydra/vendors/github.com/onsi/ginkgo" "github.com/innotech/hydra/vendors/github.com/onsi/ginkgo/config" . "github.com/innotech/hydra/vendors/github.com/onsi/ginkgo/remote" "github.com/innotech/hydra/vendors/github.com/onsi/ginkgo/types" . "github.com/onsi/gomega" ) var _ = Describe("ForwardingReporter", func() { var ( reporter *ForwardingReporter interceptor *fakeOutputInterceptor poster *fakePoster suiteSummary *types.SuiteSummary exampleSummary *types.ExampleSummary serverHost string ) BeforeEach(func() { serverHost = "127.0.0.1:7788" poster = newFakePoster() interceptor = &fakeOutputInterceptor{ InterceptedOutput: "The intercepted output!", } reporter = NewForwardingReporter(serverHost, poster, interceptor)
func (reporter *ForwardingReporter) ExampleDidComplete(exampleSummary *types.ExampleSummary) { output, _ := reporter.outputInterceptor.StopInterceptingAndReturnOutput() exampleSummary.CapturedOutput = output reporter.post("/ExampleDidComplete", exampleSummary) }
import ( . "github.com/innotech/hydra/vendors/github.com/onsi/ginkgo" "github.com/innotech/hydra/vendors/github.com/onsi/ginkgo/config" "github.com/innotech/hydra/vendors/github.com/onsi/ginkgo/reporters" st "github.com/innotech/hydra/vendors/github.com/onsi/ginkgo/stenographer" "github.com/innotech/hydra/vendors/github.com/onsi/ginkgo/types" . "github.com/onsi/gomega" "time" ) var _ = Describe("DefaultReporter", func() { var ( reporter *reporters.DefaultReporter reporterConfig config.DefaultReporterConfigType stenographer *st.FakeStenographer ginkgoConfig config.GinkgoConfigType suite *types.SuiteSummary example *types.ExampleSummary ) BeforeEach(func() { stenographer = st.NewFakeStenographer() reporterConfig = config.DefaultReporterConfigType{ NoColor: false, SlowSpecThreshold: 0.1, NoisyPendings: true, Verbose: true, } reporter = reporters.NewDefaultReporter(reporterConfig, stenographer)