Documentation ¶
Index ¶
- Variables
- func AssertEqualProto(t *testing.T, expected, actual proto.Message)
- func AssertEqualProtos(t *testing.T, expected, actual interface{})
- func AssertJSON(t *testing.T, expected, actual interface{}, expectedDiff jsondiff.Difference)
- func AssertJSONEq(t *testing.T, expected, actual interface{})
- func AssertJSONFile(t *testing.T, expectedFilePath string, actual []*v1beta2.Asset, ...)
- func AssertProtosWithJSONFile(t *testing.T, expectedFilePath string, actual []*v1beta2.Asset)
- func BuildAny(t *testing.T, protoMessage protoreflect.ProtoMessage) *anypb.Any
- func BuildStruct(t *testing.T, value map[string]interface{}) *structpb.Struct
- func CreateContainer(opts dockertest.RunOptions, retryOp func(r *dockertest.Resource) error) (func() error, error)
- func LoadJSON(t *testing.T, filePath string, v interface{})
- func Respond(t *testing.T, w http.ResponseWriter, status int, v interface{})
- func SortedAssets(assets []*v1beta2.Asset) []*v1beta2.Asset
- func ValueAsJSONReader(t *testing.T, v interface{}) io.ReadCloser
- type ArgMatcher
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger log.Logger = log.NewLogrus(log.LogrusWithWriter(io.Discard))
Logger set with writer
Functions ¶
func AssertEqualProtos ¶
func AssertJSON ¶ added in v0.9.1
func AssertJSON(t *testing.T, expected, actual interface{}, expectedDiff jsondiff.Difference)
func AssertJSONEq ¶ added in v0.9.1
func AssertJSONFile ¶ added in v0.9.1
func BuildAny ¶
func BuildAny(t *testing.T, protoMessage protoreflect.ProtoMessage) *anypb.Any
func CreateContainer ¶
func CreateContainer(opts dockertest.RunOptions, retryOp func(r *dockertest.Resource) error) (func() error, error)
CreateContainer will create a docker container using the RunOptions given
"opts" is the configuration for docker
"retryOp" is an exponential backoff-retry, because the application in the container might not be ready to accept connections yet
func ValueAsJSONReader ¶
func ValueAsJSONReader(t *testing.T, v interface{}) io.ReadCloser
Types ¶
type ArgMatcher ¶
type ArgMatcher interface{ Matches(interface{}) bool }
func OfTypeContext ¶
func OfTypeContext() ArgMatcher
Click to show internal directories.
Click to hide internal directories.