testutils

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FakeAcknowledgeReleaseIps added in v1.14.0

func FakeAcknowledgeReleaseIps(cn *v2.CiliumNode)

FakeAcknowledgeReleaseIps Fake acknowledge IPs marked for release like cilium agent would.

func GatewayAPIConformanceTest added in v1.14.0

func GatewayAPIConformanceTest(tb testing.TB)

func PrivilegedCheck added in v1.14.0

func PrivilegedCheck(c *check.C)

func PrivilegedTest added in v1.14.0

func PrivilegedTest(tb testing.TB)

func SkipIfFileMissing added in v1.14.0

func SkipIfFileMissing(t testing.TB, file string)

func WaitUntil

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

func WaitUntilWithSleep added in v1.14.0

func WaitUntilWithSleep(condition ConditionFunc, timeout, sleep time.Duration) error

WaitUntilWithSleep does the same as WaitUntil except that the sleep time between the condition checks is given.

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
	IPv6     netip.Addr
	// contains filtered or unexported fields
}

func NewTestEndpoint

func NewTestEndpoint() TestEndpoint

func NewTestHostEndpoint added in v1.14.0

func NewTestHostEndpoint() TestEndpoint

func (*TestEndpoint) ConntrackLocalLocked

func (e *TestEndpoint) ConntrackLocalLocked() bool

func (*TestEndpoint) DisableSIPVerification added in v1.14.0

func (e *TestEndpoint) DisableSIPVerification() 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) GetIdentityLocked added in v1.6.10

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

func (*TestEndpoint) GetNodeMAC

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

func (*TestEndpoint) GetOptions

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

func (*TestEndpoint) GetPolicyVerdictLogFilter added in v1.14.0

func (e *TestEndpoint) GetPolicyVerdictLogFilter() uint32

func (*TestEndpoint) GetSecurityIdentity added in v1.6.0

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

func (*TestEndpoint) IPv4Address

func (e *TestEndpoint) IPv4Address() netip.Addr

func (*TestEndpoint) IPv6Address

func (e *TestEndpoint) IPv6Address() netip.Addr

func (*TestEndpoint) InterfaceName

func (e *TestEndpoint) InterfaceName() string

func (*TestEndpoint) IsHost added in v1.14.0

func (e *TestEndpoint) IsHost() bool

func (*TestEndpoint) Logger

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

func (*TestEndpoint) RequireARPPassthrough added in v1.6.0

func (e *TestEndpoint) RequireARPPassthrough() bool

func (*TestEndpoint) RequireEgressProg added in v1.6.0

func (e *TestEndpoint) RequireEgressProg() bool

func (*TestEndpoint) RequireEndpointRoute added in v1.6.0

func (e *TestEndpoint) RequireEndpointRoute() bool

func (*TestEndpoint) RequireRouting added in v1.6.0

func (e *TestEndpoint) RequireRouting() bool

func (*TestEndpoint) SetIdentity added in v1.6.0

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

func (*TestEndpoint) StateDir

func (e *TestEndpoint) StateDir() string

func (*TestEndpoint) StringID

func (e *TestEndpoint) StringID() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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