prober

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// FIXME: Interval is set to 200 msec, as lower values will result in errors: knative/eventing#2357
	// Interval = 10 * time.Millisecond
	Interval = 200 * time.Millisecond
)

Functions

func AssertEventProber

func AssertEventProber(ctx context.Context, t *testing.T, prober Prober)

AssertEventProber will send finish event and then verify if all events propagated well

Types

type Config

type Config struct {
	Wathola
	Namespace     string
	Interval      time.Duration
	FinishedSleep time.Duration
	Serving       ServingConfig
	FailOnErrors  bool
}

Config represents a configuration for prober.

func NewConfig

func NewConfig(namespace string) *Config

NewConfig creates a new configuration object with default values filled in. Values can be influenced by kelseyhightower/envconfig with `e2e_upgrade_tests` prefix.

type ConfigMap

type ConfigMap struct {
	ConfigMapName    string
	ConfigMountPoint string
	ConfigFilename   string
}

ConfigMap represents options of wathola config toml file.

type Prober

type Prober interface {
	// Verify will verify prober state after finished has been send
	Verify(ctx context.Context) ([]error, int)

	// Finish send finished event
	Finish(ctx context.Context)

	// ReportErrors will reports found errors in proper way
	ReportErrors(t *testing.T, errors []error)
	// contains filtered or unexported methods
}

Prober is the interface for a prober, which checks the result of the probes when stopped.

func RunEventProber

func RunEventProber(ctx context.Context, log *zap.SugaredLogger, client *testlib.Client, config *Config) Prober

RunEventProber starts a single Prober of the given domain.

type Report

type Report struct {
	State  string   `json:"state"`
	Events int      `json:"events"`
	Thrown []string `json:"thrown"`
}

Report represents a receiver JSON report

type ServingConfig

type ServingConfig struct {
	Use         bool
	ScaleToZero bool
}

ServingConfig represents a options for serving test component (wathola-forwarder).

type Wathola

type Wathola struct {
	ConfigMap
	EventsTypePrefix string
	HealthEndpoint   string
	BrokerName       string
}

Wathola represents options related strictly to wathola testing tool.

Jump to

Keyboard shortcuts

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