Versions in this module Expand all Collapse all v3 v3.5.0 Feb 6, 2023 Changes in this version + const DefaultMainAgentName + const DefaultShareDir + const LigatoDNSHostNameSuffix + const MsNamePrefix + const Tapv2InputNode + var Debug bool + func AgentInstanceName(testCtx *TestCtx) string + func AgentStartOptionsForContainerRuntime(ctx *TestCtx, options interface{}) (interface{}, error) + func CreateFileOnSharedVolume(ctx *TestCtx, simpleFileName string, fileContent string) string + func DNSServerStartOptionsForContainerRuntime(ctx *TestCtx, options interface{}) (interface{}, error) + func ETCDStartOptionsForContainerRuntime(ctx *TestCtx, options interface{}) (interface{}, error) + func MicroserviceStartOptionsForContainerRuntime(ctx *TestCtx, options interface{}) (interface{}, error) + func ParseVPPTable(table string) (parsed []map[string]string) + func SupportsLinuxVRF() bool + func WithPluginConfigArg(ctx *TestCtx, pluginName string, configContent string) string + type Agent struct + func NewAgent(ctx *TestCtx, name string, optMods ...AgentOptModifier) (*Agent, error) + func (agent *Agent) Client() ctl.APIClient + func (agent *Agent) ExecVppctl(action string, args ...string) (string, error) + func (agent *Agent) GRPCConn() *grpc.ClientConn + func (agent *Agent) GenericClient() client.GenericClient + func (agent *Agent) GetDerivedValueState(baseValue proto.Message, derivedKey string) kvscheduler.ValueState + func (agent *Agent) GetDerivedValueStateClb(baseValue proto.Message, derivedKey string) func() kvscheduler.ValueState + func (agent *Agent) GetValue(value proto.Message, view kvs.View) proto.Message + func (agent *Agent) GetValueMetadata(value proto.Message, view kvs.View) (metadata interface{}) + func (agent *Agent) GetValueState(value proto.Message) kvscheduler.ValueState + func (agent *Agent) GetValueStateByKey(key string) kvscheduler.ValueState + func (agent *Agent) GetValueStateByKeyClb(key string) func() kvscheduler.ValueState + func (agent *Agent) GetValueStateClb(value proto.Message) func() kvscheduler.ValueState + func (agent *Agent) IsInSync() bool + func (agent *Agent) LinuxInterfaceHandler() linuxcalls.NetlinkAPI + func (agent *Agent) NumValues(value proto.Message, view kvs.View) int + func (agent *Agent) PingFromVPP(destAddress string, args ...string) error + func (agent *Agent) PingFromVPPAsCallback(destAddress string, args ...string) func() error + func (agent *Agent) Stop(options ...interface{}) error + func (agent *Agent) Sync() kvs.RecordedTxnOps + type AgentOpt struct + ContainerOptsHook func(*docker.CreateContainerOptions) + Env []string + Image string + InitialResync bool + Name string + Runtime ComponentRuntime + RuntimeStartOptions RuntimeStartOptionsFunc + UseEtcd bool + func DefaultAgentOpt(testCtx *TestCtx, agentName string) *AgentOpt + type AgentOptModifier func(*AgentOpt) + func WithAdditionalAgentCmdParams(params ...string) AgentOptModifier + func WithoutManualInitialAgentResync() AgentOptModifier + type CommandExecutor interface + ExecCmd func(cmd string, args ...string) (stdout, stderr string, err error) + type ComponentRuntime interface + IPAddress func() string + PID func() int + Start func(options interface{}) error + Stop func(options ...interface{}) error + type ContainerRuntime struct + func (c *ContainerRuntime) Dig(dnsServer net.IP, queryDomain string, requestedInfo DNSRecordType) ([]net.IP, error) + func (c *ContainerRuntime) ExecCmd(cmd string, args ...string) (string, string, error) + func (c *ContainerRuntime) IPAddress() string + func (c *ContainerRuntime) PID() int + func (c *ContainerRuntime) Ping(destAddress string, opts ...PingOptModifier) error + func (c *ContainerRuntime) PingAsCallback(destAddress string, opts ...PingOptModifier) func() error + func (c *ContainerRuntime) Start(options interface{}) error + func (c *ContainerRuntime) Stop(options ...interface{}) error + type ContainerStartOptions struct + AttachLogs bool + ContainerOptions *docker.CreateContainerOptions + Pull bool + type DNSOpt struct + DomainNameSuffix string + HostsConfig string + Runtime ComponentRuntime + RuntimeStartOptions RuntimeStartOptionsFunc + func DefaultDNSOpt(testCtx *TestCtx) *DNSOpt + type DNSOptModifier func(*DNSOpt) + func WithZonedStaticEntries(zoneDomainNameSuffix string, staticEntries ...string) DNSOptModifier + type DNSRecordType int + const A + const AAAA + type DNSServer struct + func NewDNSServer(ctx *TestCtx, optMods ...DNSOptModifier) (*DNSServer, error) + func (dns *DNSServer) Stop(options ...interface{}) error + type Diger interface + Dig func(dnsServer net.IP, queryDomain string, requestedInfo DNSRecordType) ([]net.IP, error) + type Etcd struct + func NewEtcd(ctx *TestCtx, optMods ...EtcdOptModifier) (*Etcd, error) + func (ec *Etcd) Get(key string) (string, error) + func (ec *Etcd) GetAll() (string, error) + func (ec *Etcd) Put(key string, value string) error + type EtcdOpt struct + Runtime ComponentRuntime + RuntimeStartOptions RuntimeStartOptionsFunc + UseHTTPS bool + UseTestContainerForNetworking bool + func DefaultEtcdOpt(ctx *TestCtx) *EtcdOpt + type EtcdOptModifier func(*EtcdOpt) + func WithEtcdHTTPsConnection() EtcdOptModifier + func WithEtcdTestContainerNetworking() EtcdOptModifier + type Microservice struct + func NewMicroservice(ctx *TestCtx, msName string, nsCalls nslinuxcalls.NetworkNamespaceAPI, ...) (*Microservice, error) + func (ms *Microservice) EnterNetNs() (exitNetNs func()) + func (ms *Microservice) Stop(options ...interface{}) error + type MicroserviceOpt struct + ContainerOptsHook func(*docker.CreateContainerOptions) + Name string + Runtime ComponentRuntime + RuntimeStartOptions RuntimeStartOptionsFunc + func DefaultMicroserviceOpt(testCtx *TestCtx, msName string) *MicroserviceOpt + type MicroserviceOptModifier func(*MicroserviceOpt) + func WithMSContainerStartHook(hook func(*docker.CreateContainerOptions)) MicroserviceOptModifier + type PingOpt struct + AllowedLoss int + Count int + MaxTimeout int + SourceIface string + func DefaultPingOpts() *PingOpt + func NewPingOpts(opts ...PingOptModifier) *PingOpt + type PingOptModifier func(*PingOpt) + func PingWithAllowedLoss(maxLoss int) PingOptModifier + func PingWithSourceInterface(iface string) PingOptModifier + type Pinger interface + Ping func(destAddress string, opts ...PingOptModifier) error + PingAsCallback func(destAddress string, opts ...PingOptModifier) func() error + type RuntimeStartOptionsFunc func(ctx *TestCtx, options interface{}) (interface{}, error) + type SetupOpt struct + AgentOptMods []AgentOptModifier + DNSOptMods []DNSOptModifier + EtcdOptMods []EtcdOptModifier + SetupAgent bool + SetupDNSServer bool + SetupEtcd bool + func DefaultSetupOpt(testCtx *TestCtx) *SetupOpt + type SetupOptModifier func(*SetupOpt) + func WithCustomVPPAgent() SetupOptModifier + func WithDNSServer(dnsOpts ...DNSOptModifier) SetupOptModifier + func WithEtcd(etcdOptMods ...EtcdOptModifier) SetupOptModifier + func WithoutVPPAgent() SetupOptModifier + type TestCtx struct + Agent *Agent + DNSServer *DNSServer + DataDir string + Etcd *Etcd + Logger *log.Logger + ShareDir string + func NewTest(t *testing.T) *TestCtx + func Setup(t *testing.T, optMods ...SetupOptModifier) *TestCtx + func (test *TestCtx) AgentInSync() bool + func (test *TestCtx) ExecCmd(cmd string, args ...string) (stdout, stderr string, err error) + func (test *TestCtx) ExecVppctl(action string, args ...string) (string, error) + func (test *TestCtx) GRPCConn() *grpc.ClientConn + func (test *TestCtx) GenericClient() client.GenericClient + func (test *TestCtx) GetDerivedValueState(baseValue proto.Message, derivedKey string) kvscheduler.ValueState + func (test *TestCtx) GetDerivedValueStateClb(baseValue proto.Message, derivedKey string) func() kvscheduler.ValueState + func (test *TestCtx) GetRunningMicroservice(msName string) *Microservice + func (test *TestCtx) GetValue(value proto.Message, view kvs.View) proto.Message + func (test *TestCtx) GetValueMetadata(value proto.Message, view kvs.View) (metadata interface{}) + func (test *TestCtx) GetValueState(value proto.Message) kvscheduler.ValueState + func (test *TestCtx) GetValueStateByKey(key string) kvscheduler.ValueState + func (test *TestCtx) GetValueStateClb(value proto.Message) func() kvscheduler.ValueState + func (test *TestCtx) NumValues(value proto.Message, view kvs.View) int + func (test *TestCtx) PingFromMs(msName, dstAddress string, opts ...PingOptModifier) error + func (test *TestCtx) PingFromMsClb(msName, dstAddress string, opts ...PingOptModifier) func() error + func (test *TestCtx) PingFromVPP(destAddress string) error + func (test *TestCtx) PingFromVPPClb(destAddress string) func() error + func (test *TestCtx) StartAgent(name string, optMods ...AgentOptModifier) *Agent + func (test *TestCtx) StartMicroservice(name string, optMods ...MicroserviceOptModifier) *Microservice + func (test *TestCtx) StopAgent(name string) + func (test *TestCtx) StopMicroservice(name string) + func (test *TestCtx) Teardown() + func (test *TestCtx) TestConnection(fromMs, toMs, toAddr, listenAddr string, toPort, listenPort uint16, udp bool, ...) error + func (test *TestCtx) VppRelease() string