test

package
v2.0.0-...-82fddbe Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: MIT Imports: 23 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyNanEqual

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

func CheckErr

func CheckErr(err error)

func DeepEqual

func DeepEqual[T any](t *testing.T, expected, actual T)

func Must

func Must[T any](t T, err error) T

func NaNEqual

func NaNEqual[T BasicallyAFloat](t *testing.T, expected, actual T)

func SetEmptyMemcachedClient

func SetEmptyMemcachedClient(ctx context.Context) context.Context

func SetLocalAWSClient

func SetLocalAWSClient(ctx context.Context) context.Context

func SetLocalAWSClientWithRedirects

func SetLocalAWSClientWithRedirects(ctx context.Context, bucketRedirect map[string]string) context.Context

func SliceNaNEqual

func SliceNaNEqual[T BasicallyAFloat](t *testing.T, expected []T, actual []T)

Types

type BadReadCloser

type BadReadCloser struct {
	BadReader
}

BadReadCloser meets the criteria for an io.ReadCloser

func (BadReadCloser) Close

func (rc BadReadCloser) Close() error

type BadReader

type BadReader struct{}

BadReader meets the criteria for an io.Reader()

func (BadReader) Read

func (r BadReader) Read(b []byte) (n int, err error)

type BasicallyAFloat

type BasicallyAFloat interface {
	~float64
}

type EmptyMemcachedClient

type EmptyMemcachedClient struct{}

func (EmptyMemcachedClient) Get

func (cache EmptyMemcachedClient) Get(key string) (item *memcache.Item, err error)

func (EmptyMemcachedClient) Set

func (cache EmptyMemcachedClient) Set(item *memcache.Item) error

type FakeHttpWriter

type FakeHttpWriter struct {
	Headers    http.Header
	Bytes      []byte
	StatusCode int
}

FakeHttpWriter can be used in place of an http writer (only when the var line below is present)

func NewFakeHttpWriter

func NewFakeHttpWriter() *FakeHttpWriter

func (*FakeHttpWriter) Header

func (w *FakeHttpWriter) Header() http.Header

func (*FakeHttpWriter) Write

func (w *FakeHttpWriter) Write(b []byte) (int, error)

func (*FakeHttpWriter) WriteHeader

func (w *FakeHttpWriter) WriteHeader(statusCode int)

type LocalS3Client

type LocalS3Client struct {
	BucketRedirect map[string]string
}

func (LocalS3Client) DeleteObject

func (tClient LocalS3Client) DeleteObject(ctx context.Context, input *s3.DeleteObjectInput, opts ...func(*s3.Options)) (*s3.DeleteObjectOutput, error)

func (LocalS3Client) GetObject

func (tClient LocalS3Client) GetObject(ctx context.Context, input *s3.GetObjectInput, options ...func(*s3.Options)) (*s3.GetObjectOutput, error)

func (LocalS3Client) HeadObject

func (tClient LocalS3Client) HeadObject(ctx context.Context, input *s3.HeadObjectInput, opts ...func(*s3.Options)) (*s3.HeadObjectOutput, error)

func (LocalS3Client) ListObjectsV2

func (tClient LocalS3Client) ListObjectsV2(ctx context.Context, input *s3.ListObjectsV2Input, options ...func(*s3.Options)) (*s3.ListObjectsV2Output, error)

func (LocalS3Client) PutObject

type TestSettings

type TestSettings struct {
	RunTests      bool
	RunAcceptance bool
}

func RegisterTests

func RegisterTests(containsTests bool, containsBenchmarks bool) TestSettings

Jump to

Keyboard shortcuts

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