testutils

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CiliumRootDir = "" // Populated from ldflags in Makefile
)

Functions

func RandomRune added in v1.5.0

func RandomRune() string

RandomRune returns a random name with a predefined length of 12

func RandomRuneWithLen added in v1.5.0

func RandomRuneWithLen(n int) string

RandomRuneWithLen returns a random name of specified length

func RandomRuneWithPrefix added in v1.5.0

func RandomRuneWithPrefix(prefix string, n int) string

RandomRuneWithPrefix returns a random name string with fixed prefix

func WaitUntil

func WaitUntil(condition ConditionFunc, timeout time.Duration) error

WaitUntil evaluates the condition every 10 milliseconds and waits for the condition to be met. The function will time out and return an error after timeout

Types

type ConditionFunc

type ConditionFunc func() bool

ConditionFunc is the function implementing the condition, it must return true if the condition has been met

type TestEndpoint

type TestEndpoint struct {
	Id       uint64
	Identity *identity.Identity
	Opts     *option.IntOptions
	MAC      mac.MAC
}

func NewTestEndpoint

func NewTestEndpoint() TestEndpoint

func (*TestEndpoint) ConntrackLocalLocked

func (e *TestEndpoint) ConntrackLocalLocked() bool

func (*TestEndpoint) GetCIDRPrefixLengths

func (e *TestEndpoint) GetCIDRPrefixLengths() ([]int, []int)

func (*TestEndpoint) GetID

func (e *TestEndpoint) GetID() uint64

func (*TestEndpoint) GetIdentity

func (e *TestEndpoint) GetIdentity() identity.NumericIdentity

func (*TestEndpoint) GetNodeMAC

func (e *TestEndpoint) GetNodeMAC() mac.MAC

func (*TestEndpoint) GetOptions

func (e *TestEndpoint) GetOptions() *option.IntOptions

func (*TestEndpoint) GetSecurityIdentity

func (e *TestEndpoint) GetSecurityIdentity() *identity.Identity

func (*TestEndpoint) HasIpvlanDataPath added in v1.5.0

func (e *TestEndpoint) HasIpvlanDataPath() bool

func (*TestEndpoint) IPv4Address

func (e *TestEndpoint) IPv4Address() addressing.CiliumIPv4

func (*TestEndpoint) IPv6Address

func (e *TestEndpoint) IPv6Address() addressing.CiliumIPv6

func (*TestEndpoint) InterfaceName

func (e *TestEndpoint) InterfaceName() string

func (*TestEndpoint) Logger

func (e *TestEndpoint) Logger(subsystem string) *logrus.Entry

func (*TestEndpoint) MapPath added in v1.5.0

func (e *TestEndpoint) MapPath() string

func (*TestEndpoint) RequireARPPassthrough

func (e *TestEndpoint) RequireARPPassthrough() bool

func (*TestEndpoint) RequireEgressProg

func (e *TestEndpoint) RequireEgressProg() bool

func (*TestEndpoint) RequireEndpointRoute

func (e *TestEndpoint) RequireEndpointRoute() bool

func (*TestEndpoint) RequireRouting

func (e *TestEndpoint) RequireRouting() bool

func (*TestEndpoint) SetIdentity

func (e *TestEndpoint) SetIdentity(secID int64, newEndpoint bool)

func (*TestEndpoint) StateDir

func (e *TestEndpoint) StateDir() string

func (*TestEndpoint) StringID

func (e *TestEndpoint) StringID() string

Jump to

Keyboard shortcuts

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