Files
weave-scope/app/mock_reporter_test.go
2016-03-09 13:48:28 +00:00

17 lines
575 B
Go

package app_test
import (
"github.com/weaveworks/scope/report"
"github.com/weaveworks/scope/test/fixture"
"golang.org/x/net/context"
)
// StaticReport is used as a fixture in tests. It emulates an xfer.Collector.
type StaticReport struct{}
func (s StaticReport) Report(context.Context) (report.Report, error) { return fixture.Report, nil }
func (s StaticReport) Add(context.Context, report.Report) error { return nil }
func (s StaticReport) WaitOn(context.Context, chan struct{}) {}
func (s StaticReport) UnWait(context.Context, chan struct{}) {}