checkvppagentmechanism

package
v0.0.0-...-83e77c6 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

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.

Jump to

Keyboard shortcuts

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