testutils

package
v0.0.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyDir

func CopyDir(from, to string) error

func CopyFile

func CopyFile(from, to string) error

Types

type Request

type Request struct {
	// contains filtered or unexported fields
}

func NewRequest

func NewRequest(method, route string) *Request

func (*Request) RunOnHandler

func (r *Request) RunOnHandler(h http.Handler) *httptest.ResponseRecorder

func (*Request) WithBody

func (r *Request) WithBody(body []byte) *Request

func (*Request) WithHeader

func (r *Request) WithHeader(key, value string) *Request

type TestClock

type TestClock struct {
	// contains filtered or unexported fields
}

func NewTestClock

func NewTestClock(t time.Time, step time.Duration) *TestClock

func (*TestClock) Now

func (c *TestClock) Now() time.Time

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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