testutil

package
v1.14.0-rc.6 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package testutil has few util functions for testing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnection

func NewConnection() *networkservice.NetworkServiceRequest

NewConnection - create connection for testing

func TrimLogTime

func TrimLogTime(buff fmt.Stringer) string

TrimLogTime - to format logs

Types

type CustomError

type CustomError struct{}

CustomError - custom error for testing

func (*CustomError) Error

func (*CustomError) Error() string

Error - error message example

func (*CustomError) StackTrace

func (*CustomError) StackTrace() errors.StackTrace

StackTrace - testing errors utility

type ErrorServer

type ErrorServer struct{}

ErrorServer - error server for testing

func (*ErrorServer) Close

func (c *ErrorServer) Close(ctx context.Context, connection *networkservice.Connection) (*empty.Empty, error)

Close - test request

func (*ErrorServer) Request

Request - test request

type LabelChangerFirstServer

type LabelChangerFirstServer struct{}

LabelChangerFirstServer - common server for testing

func (*LabelChangerFirstServer) Close

Close - test request

func (*LabelChangerFirstServer) Request

Request - test request

type LabelChangerSecondServer

type LabelChangerSecondServer struct{}

LabelChangerSecondServer - common server for testing

func (*LabelChangerSecondServer) Close

Close - test request

func (*LabelChangerSecondServer) Request

Request - test request

Jump to

Keyboard shortcuts

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