testing

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitForSwitchesReady

func WaitForSwitchesReady(ctx context.Context, kube client.WithWatch, expectedSwitches []string, timeout time.Duration) error

Types

type Duration

type Duration struct {
	time.Duration
}

func (*Duration) UnmarshalJSON

func (duration *Duration) UnmarshalJSON(b []byte) error

type Iperf3Report

type Iperf3Report struct {
	Intervals []Iperf3ReportInterval `json:"intervals"`
	End       Iperf3ReportEnd        `json:"end"`
}

func ParseIperf3Report

func ParseIperf3Report(data string) (*Iperf3Report, error)

type Iperf3ReportEnd

type Iperf3ReportEnd struct {
	SumSent     Iperf3ReportSum `json:"sum_sent"`
	SumReceived Iperf3ReportSum `json:"sum_received"`
}

type Iperf3ReportInterval

type Iperf3ReportInterval struct {
	Sum Iperf3ReportSum `json:"sum"`
}

type Iperf3ReportSum

type Iperf3ReportSum struct {
	Bytes         int64   `json:"bytes"`
	BitsPerSecond float64 `json:"bits_per_second"`
}

type LStep

type LStep struct {
	Name string `json:"name,omitempty"`

	WaitReady        *StepWaitReady        `json:"waitready,omitempty"`
	Enforce          *string               `json:"enforce,omitempty"`
	Update           *string               `json:"update,omitempty"`
	Netconf          *StepNetconf          `json:"netconf,omitempty"`
	TestConnectivity *StepTestConnectivity `json:"connectivity,omitempty"`
}

type LStepTestConnectivity

type LStepTestConnectivity struct{}

type LTest

type LTest struct {
	Labels map[string]string `json:"labels,omitempty"`
	Steps  []LStep           `json:"steps,omitempty"`
}

type LoaderFile

type LoaderFile struct {
	Blocks map[string]string `json:"blocks,omitempty"`
	Tests  map[string]LTest  `json:"tests,omitempty"`
}

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

func NewRunner

func NewRunner(cfg RunnerConfig) (*Runner, error)

func (*Runner) Run

func (r *Runner) Run(ctx context.Context) error

type RunnerConfig

type RunnerConfig struct {
	StepHelper  StepHelper
	Timeout     time.Duration
	TestTimeout time.Duration
	TestFiles   []string
	TestNames   []string
	RandomOrder bool
	RepeatTimes uint
	RepeatFor   time.Duration
}

type Step

type Step interface {
	Run(ctx context.Context, h StepHelper) error
}

type StepAPIAbbr

type StepAPIAbbr struct {
	// contains filtered or unexported fields
}

func (*StepAPIAbbr) Run

func (s *StepAPIAbbr) Run(ctx context.Context, h StepHelper) error

type StepHelper

type StepHelper interface {
	Kube() client.WithWatch
	ServerExec(ctx context.Context, server, cmd string, timeout time.Duration) (string, error)
}

type StepNetconf

type StepNetconf struct {
	// contains filtered or unexported fields
}

func (*StepNetconf) Run

func (s *StepNetconf) Run(ctx context.Context, h StepHelper) error

type StepTestConnectivity

type StepTestConnectivity struct {
	PingCount    uint    `json:"pingCount,omitempty"`
	IPerfSeconds uint    `json:"iperfSeconds,omitempty"`
	IPerfSpeed   float64 `json:"iperfSpeed,omitempty"`
	// contains filtered or unexported fields
}

func (*StepTestConnectivity) Run

type StepWaitReady

type StepWaitReady struct {
	Timeout Duration `json:"timeout,omitempty"`
}

func (*StepWaitReady) Run

func (s *StepWaitReady) Run(ctx context.Context, h StepHelper) error

type Test

type Test struct {
	// contains filtered or unexported fields
}

type VLABStepHelper

type VLABStepHelper struct {
	// contains filtered or unexported fields
}

func NewVLABStepHelper

func NewVLABStepHelper(kube client.WithWatch, sshPorts map[string]uint, sshKeyPath string) *VLABStepHelper

func (*VLABStepHelper) Kube

func (h *VLABStepHelper) Kube() client.WithWatch

func (*VLABStepHelper) ServerExec

func (h *VLABStepHelper) ServerExec(ctx context.Context, server, cmd string, timeout time.Duration) (string, error)

Jump to

Keyboard shortcuts

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