mock_pipelined

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AddUEMacFlowCommand    = 1
	UpdateIPFIXFlowCommand = 2
	DeleteUEMacFlowCommand = 3
)

Variables

This section is empty.

Functions

func AssertIDeleteMacFlow

func AssertIDeleteMacFlow(t *testing.T, pipelined *MockPipelined)

func AssertIPIXFlowUpdate

func AssertIPIXFlowUpdate(t *testing.T, pipelined *MockPipelined)

func AssertMacFlowInstall

func AssertMacFlowInstall(t *testing.T, pipelined *MockPipelined)

helper assert functions for testing

func AssertReceivedApMacAndAddress

func AssertReceivedApMacAndAddress(t *testing.T,
	pipelined *MockPipelined, expectedApMac string, expectedApName string)

Types

type Action

type Action struct {
	Request         *protos.UEMacFlowRequest
	ExecutedCommand int
	Response        *protos.FlowResponse
	Err             error
}

records all the requests, responses and errors done to the client

type MockPipelined

type MockPipelined struct {
	*protos.UnimplementedPipelinedServer
	Actions []*Action
}

SessionManager test sessiond implementation

func NewRunningPipelined

func NewRunningPipelined(t *testing.T) *MockPipelined

func (*MockPipelined) AddUEMacFlow

func (*MockPipelined) ClearActions

func (c *MockPipelined) ClearActions()

func (*MockPipelined) DeleteUEMacFlow

func (c *MockPipelined) DeleteUEMacFlow(ctx context.Context, req *protos.UEMacFlowRequest) (*protos.FlowResponse, error)

func (*MockPipelined) GetLastAction

func (c *MockPipelined) GetLastAction() (*Action, error)

func (*MockPipelined) UpdateIPFIXFlow

func (c *MockPipelined) UpdateIPFIXFlow(ctx context.Context, req *protos.UEMacFlowRequest) (*protos.FlowResponse, error)

Jump to

Keyboard shortcuts

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