Documentation ¶
Overview ¶
Package checkvppagentmechanism - provides a test suite for testing vppagent mechanism implementation chain elements
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientSuite ¶
func NewClientSuite( clientUnderTest networkservice.NetworkServiceClient, mechanismType string, mechanismCheck func(*testing.T, *networkservice.Mechanism), vppOnReturnCheck func(*testing.T, *configurator.Config), request *networkservice.NetworkServiceRequest, connClose *networkservice.Connection, ) *checkmechanism.ClientSuite
NewClientSuite - return a test suite for testing vppagent mechanism implementations
clientUnderTest - the client we are testing to make sure it correctly implements a Mechanism mechanismType - Mechanism.Type implemented by the clientUnderTest mechanismCheck - function to check that the clientUnderTest has properly added Mechanism.Parameters to the Mechanism it has appended to MechanismPreferences vppOnReturnCheck - function to check that the vppagent *configurator.Config *after* clientUnderTest has returned are correct request - NetworkServiceRequest to be used for testing connClose - Connection to be used for testing Close(...)
func NewServerSuite ¶
func NewServerSuite( serverUnderTest networkservice.NetworkServiceServer, mechanismType string, mechanismCheck func(t *testing.T, mechanism *networkservice.Mechanism), vppCheckOnReturn func(*testing.T, *configurator.Config), request *networkservice.NetworkServiceRequest, connClose *networkservice.Connection, ) *checkmechanism.ServerSuite
NewServerSuite - returns a ServerSuite to test a vppagent mechanism implementation
serverUnderTest - the server being tested to make sure it correctly implements a Mechanism configureContext - a function that is applied to context.Background to make sure anything needed by the serverUnderTest is present in the context.Context mechanismType - Mechanism.Type implemented by the serverUnderTest vppOnReturnCheck - function to check that the vppagent *configurator.Config *after* clientUnderTest has returned are correct request - NetworkServiceRequest to be used for testing connClose - Connection to be used for testing Close(...)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.