import ( . "github.com/gocircuit/escher/github.com/onsi/ginkgo" "github.com/gocircuit/escher/github.com/onsi/ginkgo/config" "github.com/gocircuit/escher/github.com/onsi/ginkgo/reporters" st "github.com/gocircuit/escher/github.com/onsi/ginkgo/reporters/stenographer" "github.com/gocircuit/escher/github.com/onsi/ginkgo/types" . "github.com/gocircuit/escher/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 spec *types.SpecSummary ) BeforeEach(func() { stenographer = st.NewFakeStenographer() reporterConfig = config.DefaultReporterConfigType{ NoColor: false, SlowSpecThreshold: 0.1, NoisyPendings: true, Verbose: true, FullTrace: true, }
func (reporter *ForwardingReporter) SpecDidComplete(specSummary *types.SpecSummary) { output, _ := reporter.outputInterceptor.StopInterceptingAndReturnOutput() reporter.outputInterceptor.StartInterceptingOutput() specSummary.CapturedOutput = output reporter.post("/SpecDidComplete", specSummary) }
import ( "encoding/json" . "github.com/gocircuit/escher/github.com/onsi/ginkgo" "github.com/gocircuit/escher/github.com/onsi/ginkgo/config" . "github.com/gocircuit/escher/github.com/onsi/ginkgo/internal/remote" "github.com/gocircuit/escher/github.com/onsi/ginkgo/types" . "github.com/gocircuit/escher/github.com/onsi/gomega" ) var _ = Describe("ForwardingReporter", func() { var ( reporter *ForwardingReporter interceptor *fakeOutputInterceptor poster *fakePoster suiteSummary *types.SuiteSummary specSummary *types.SpecSummary setupSummary *types.SetupSummary serverHost string ) BeforeEach(func() { serverHost = "http://127.0.0.1:7788" poster = newFakePoster() interceptor = &fakeOutputInterceptor{ InterceptedOutput: "The intercepted output!", } reporter = NewForwardingReporter(serverHost, poster, interceptor)