utils

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModelVerifier

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

ModelVerifier is a Verifier to check model.Model state

func NewModelVerifier

func NewModelVerifier(model model.Model) *ModelVerifier

NewModelVerifier is a constructor for ModelVerifier

func (*ModelVerifier) ClientConnectionExists

func (v *ModelVerifier) ClientConnectionExists(connectionID, srcID, dstID, remoteNSM, nse, forwarder string) *ModelVerifier

ClientConnectionExists is a builder method to add check if model.ClientConnection with

ConnectionID == connectionID
Xcon.Source.Id = srcID
Xcon.Destination.Id = dst.ID
RemoteNsm.Name = remoteNSM
Endpoint.NetworkServiceEndpoint.Name = nse
Forwarder.RegisteredName = forwarder

exists in v.model

func (*ModelVerifier) ClientConnectionNotExists

func (v *ModelVerifier) ClientConnectionNotExists(connectionID string) *ModelVerifier

ClientConnectionNotExists is a builder method to add check if model.ClientConnection with

ConnectionID == connectionID

doesn't exist in v.model

func (*ModelVerifier) EndpointExists

func (v *ModelVerifier) EndpointExists(name, nsm string) *ModelVerifier

EndpointExists is a builder method to add check if model.Endpoint with

Endpoint.NetworkServiceEndpoint.Name == name
Endpoint.NetworkServiceManager.Name == nsm

exists in v.model

func (*ModelVerifier) EndpointNotExists

func (v *ModelVerifier) EndpointNotExists(name string) *ModelVerifier

EndpointNotExists is a builder method to add check if model.Endpoint with

Endpoint.NetworkServiceEndpoint.Name == name

doesn't exist in v.model

func (*ModelVerifier) ForwarderExists

func (v *ModelVerifier) ForwarderExists(name string) *ModelVerifier

ForwarderExists is a builder method to add check if model.Forwarder with

RegisteredName = name

exists in v.model

func (*ModelVerifier) ForwarderNotExists

func (v *ModelVerifier) ForwarderNotExists(name string) *ModelVerifier

ForwarderNotExists is a builder method to add check if model.Forwarder with

RegisteredName = name

doesn't exist in v.model

func (*ModelVerifier) Verify

func (v *ModelVerifier) Verify(t *testing.T)

Verify invokes all stored checks

type Verifier

type Verifier interface {
	Verify(t *testing.T)
}

Verifier is a common verifier interface to be used in tests

Jump to

Keyboard shortcuts

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