Documentation ¶
Overview ¶
Package oonitest contains code used for testing.
Index ¶
- type FakeLoggerHandler
- type FakeOutput
- type FakeProbeCLI
- func (cli *FakeProbeCLI) Config() *config.Config
- func (cli *FakeProbeCLI) DB() *database.Database
- func (cli *FakeProbeCLI) Home() string
- func (cli *FakeProbeCLI) IsBatch() bool
- func (cli *FakeProbeCLI) NewProbeEngine(ctx context.Context, runType model.RunType) (ooni.ProbeEngine, error)
- func (cli *FakeProbeCLI) TempDir() string
- type FakeProbeEngine
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeLoggerHandler ¶
type FakeLoggerHandler struct { FakeEntries []*log.Entry FakeErr error // contains filtered or unexported fields }
FakeLoggerHandler fakes apex.log.Handler.
type FakeOutput ¶
type FakeOutput struct { FakeSectionTitle []string // contains filtered or unexported fields }
FakeOutput allows to fake the output package.
func (*FakeOutput) SectionTitle ¶
func (fo *FakeOutput) SectionTitle(s string)
SectionTitle writes the section title.
type FakeProbeCLI ¶
type FakeProbeCLI struct { FakeConfig *config.Config FakeDB *database.Database FakeIsBatch bool FakeHome string FakeTempDir string FakeProbeEnginePtr ooni.ProbeEngine FakeProbeEngineErr error }
FakeProbeCLI fakes ooni.ProbeCLI
func (*FakeProbeCLI) Config ¶
func (cli *FakeProbeCLI) Config() *config.Config
Config implements ProbeCLI.Config
func (*FakeProbeCLI) DB ¶
func (cli *FakeProbeCLI) DB() *database.Database
DB implements ProbeCLI.DB
func (*FakeProbeCLI) IsBatch ¶
func (cli *FakeProbeCLI) IsBatch() bool
IsBatch implements ProbeCLI.IsBatch
func (*FakeProbeCLI) NewProbeEngine ¶
func (cli *FakeProbeCLI) NewProbeEngine(ctx context.Context, runType model.RunType) (ooni.ProbeEngine, error)
NewProbeEngine implements ProbeCLI.NewProbeEngine
func (*FakeProbeCLI) TempDir ¶
func (cli *FakeProbeCLI) TempDir() string
TempDir implements ProbeCLI.TempDir
type FakeProbeEngine ¶
type FakeProbeEngine struct { FakeClose error FakeMaybeLookupLocation error FakeProbeASNString string FakeProbeCC string FakeProbeIP string FakeProbeNetworkName string }
FakeProbeEngine fakes ooni.ProbeEngine
func (*FakeProbeEngine) Close ¶
func (eng *FakeProbeEngine) Close() error
Close implements ProbeEngine.Close
func (*FakeProbeEngine) MaybeLookupLocation ¶
func (eng *FakeProbeEngine) MaybeLookupLocation() error
MaybeLookupLocation implements ProbeEngine.MaybeLookupLocation
func (*FakeProbeEngine) ProbeASNString ¶
func (eng *FakeProbeEngine) ProbeASNString() string
ProbeASNString implements ProbeEngine.ProbeASNString
func (*FakeProbeEngine) ProbeCC ¶
func (eng *FakeProbeEngine) ProbeCC() string
ProbeCC implements ProbeEngine.ProbeCC
func (*FakeProbeEngine) ProbeIP ¶
func (eng *FakeProbeEngine) ProbeIP() string
ProbeIP implements ProbeEngine.ProbeIP
func (*FakeProbeEngine) ProbeNetworkName ¶
func (eng *FakeProbeEngine) ProbeNetworkName() string
ProbeNetworkName implements ProbeEngine.ProbeNetworkName