oonitest

package
v0.0.0-...-bd88772 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package oonitest contains code used for testing.

Index

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.

func (*FakeLoggerHandler) HandleLog

func (handler *FakeLoggerHandler) HandleLog(entry *log.Entry) error

HandleLog implements Handler.HandleLog.

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             sqlbuilder.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() sqlbuilder.Database

DB implements ProbeCLI.DB

func (*FakeProbeCLI) Home

func (cli *FakeProbeCLI) Home() string

Home implements ProbeCLI.Home

func (*FakeProbeCLI) IsBatch

func (cli *FakeProbeCLI) IsBatch() bool

IsBatch implements ProbeCLI.IsBatch

func (*FakeProbeCLI) NewProbeEngine

func (cli *FakeProbeCLI) NewProbeEngine(ctx context.Context) (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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL