testutil

package
v1.14.2-rc.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 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 Normalize added in v1.14.2

func Normalize(in string) string

Normalize normalizes test input of logs to make it usable for equals operations

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