Documentation ¶
Index ¶
- Variables
- func AssertAwsStringEqual(t *testing.T, expected string, actual *string)
- func AssertContentType(t *testing.T, headers textproto.MIMEHeader, expectedMediaType string, ...)
- func AssertContentTypeAndGetParams(t *testing.T, headers textproto.MIMEHeader, expectedMediaType string) (params map[string]string)
- func AssertDecodedContent(t *testing.T, content io.Reader, expected string)
- func AssertNextPart(t *testing.T, reader *multipart.Reader, mediaType, decoded string)
- func AssertValue(t *testing.T, name, expected, actual string)
- func AwsServerError(msg string) error
- func CheckDockerIsRunning() (err error)
- func CleanupDockerContainer(service, containerId string) (errResult error)
- func ErrorIs(err, expectedErr error) cmp.Comparison
- func ErrorIsNot(err, unexpectedErr error) cmp.Comparison
- func ExpectPanic(t *testing.T, expectedMsg string)
- func GetDecodedContent(t *testing.T, content io.Reader) string
- func GetNextPart(t *testing.T, reader *multipart.Reader, mediaType string) io.Reader
- func GetNextPartContent(t *testing.T, reader *multipart.Reader, mediaType string) string
- func LaunchDockerContainer(service string, localEndpoint BaseEndpoint, containerPort int, dbImage string) (cleanup func() error, err error)
- func ParseMessage(t *testing.T, content string) (msg *mail.Message)
- func ParseMultipartMessageAndBoundary(t *testing.T, content string) (msg *mail.Message, boundary string, partReader *multipart.Reader)
- func ParseTextMessage(t *testing.T, content string) (msg *mail.Message, qpReader *quotedprintable.Reader)
- func PickUnusedHostPort() (string, error)
- func PullDockerImage(dbImage string) error
- func RandomEmail(n int, domain string) string
- func RandomString(n int) string
- func TimesEqual(expectedTime, actualTime time.Time) cmp.Comparison
- type BaseEndpoint
- type ErrWriter
- type Logs
- type TestHeader
Constants ¶
This section is empty.
Variables ¶
View Source
var CharsetUtf8 = map[string]string{"charset": "utf-8"}
Functions ¶
func AssertAwsStringEqual ¶
func AssertContentType ¶
func AssertDecodedContent ¶
func AssertNextPart ¶
func AssertValue ¶
func AwsServerError ¶
func CheckDockerIsRunning ¶
func CheckDockerIsRunning() (err error)
func CleanupDockerContainer ¶
func ErrorIs ¶
func ErrorIs(err, expectedErr error) cmp.Comparison
func ErrorIsNot ¶
func ErrorIsNot(err, unexpectedErr error) cmp.Comparison
func ExpectPanic ¶
func GetNextPart ¶
func GetNextPartContent ¶
func LaunchDockerContainer ¶
func ParseTextMessage ¶
func PickUnusedHostPort ¶
func PullDockerImage ¶
func RandomEmail ¶
func RandomString ¶
Inspired by: - https://stackoverflow.com/questions/22892120/how-to-generate-a-random-string-of-a-fixed-length-in-go
func TimesEqual ¶
func TimesEqual(expectedTime, actualTime time.Time) cmp.Comparison
Types ¶
type BaseEndpoint ¶
type BaseEndpoint string
func AwsConfig ¶
func AwsConfig() (*aws.Config, *BaseEndpoint, error)
Inspired by: - https://davidagood.com/dynamodb-local-go/ - https://github.com/aws/aws-sdk-go-v2/blob/main/config/example_test.go
Click to show internal directories.
Click to hide internal directories.