checkerror

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package checkerror provides chain elements to check for errors during testing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPropagatesErrorClient

func CheckPropagatesErrorClient(t *testing.T, clientUnderTest networkservice.NetworkServiceClient) networkservice.NetworkServiceClient

CheckPropagatesErrorClient - NetworkServiceClient that will check to see if the clientUnderTest correctly propagates error

func CheckPropogatesErrorServer

func CheckPropogatesErrorServer(t *testing.T, serverUnderTest networkservice.NetworkServiceServer) networkservice.NetworkServiceServer

CheckPropogatesErrorServer - NetworkServiceServer that will check to see if the serverUnderTest correctly propagates error

func NewClient

func NewClient(t *testing.T, isNil bool, errs ...error) networkservice.NetworkServiceClient

NewClient - returns NetworkServiceClient chain element that checks for an error being returned from the next element in the chain

t - *testing.T for checking
isNil - if true, check that error is nil, if false, check that err is not nil.
errs - optional - if errs[0] is provided, will check to see if the error matches errs[0]

func NewServer

func NewServer(t *testing.T, isNil bool, errs ...error) networkservice.NetworkServiceServer

NewServer - returns NetworkServiceServer chain element that checks for an error being returned from the next element in the chain

t - *testing.T for checking
isNil - if true, check that error is nil, if false, check that err is not nil.
errs - optional - if errs[0] is provided, will check to see if the error matches errs[0]

Types

This section is empty.

Jump to

Keyboard shortcuts

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