utils

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Logger set with writer

Functions

func AssertEqualProto

func AssertEqualProto(t *testing.T, expected, actual proto.Message)

func AssertEqualProtos

func AssertEqualProtos(t *testing.T, expected, actual any)

func AssertJSON added in v0.9.1

func AssertJSON(t *testing.T, expected, actual any, expectedDiff jsondiff.Difference)

func AssertJSONEq added in v0.9.1

func AssertJSONEq(t *testing.T, expected, actual any)

func AssertJSONFile added in v0.9.1

func AssertJSONFile(t *testing.T, expectedFilePath string, actual []*meteorv1beta1.Entity, expectedDiff jsondiff.Difference)

func AssertProtosWithJSONFile

func AssertProtosWithJSONFile(t *testing.T, expectedFilePath string, actual []*meteorv1beta1.Entity)

func CheckDockerAvailability added in v0.13.0

func CheckDockerAvailability() bool

CheckDockerAvailability returns true if the Docker daemon is reachable.

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 LoadJSON

func LoadJSON(t *testing.T, filePath string, v any)

func Respond

func Respond(t *testing.T, w http.ResponseWriter, status int, v any)

func SkipIfNoDocker added in v0.13.0

func SkipIfNoDocker(t *testing.T, available bool)

SkipIfNoDocker skips the test if Docker is not available.

func SortedEntities added in v0.13.0

func SortedEntities(entities []*meteorv1beta1.Entity) []*meteorv1beta1.Entity

func ValueAsJSONReader

func ValueAsJSONReader(t *testing.T, v any) io.ReadCloser

Types

type ArgMatcher

type ArgMatcher interface{ Matches(any) bool }

func OfTypeContext

func OfTypeContext() ArgMatcher

Jump to

Keyboard shortcuts

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