Documentation ¶
Overview ¶
Package tests provides tests helpers.
Index ¶
- func AddToFuzzCorpus(t testing.TB, prefix string, data []byte)
- func AssertGRPCError(tb testing.TB, expected *status.Status, actual error)
- func AssertGRPCErrorRE(tb testing.TB, expectedCode codes.Code, expectedMessageRE string, actual error)
- func GenCredentials(tb testing.TB) (string, string)
- func GenEmail(tb testing.TB) string
- func GetAWSKeys(tb testing.TB) (accessKey, secretKey string)
- func SetTestIDReader(t *testing.T)
- type IDReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddToFuzzCorpus ¶
AddToFuzzCorpus adds data to go-fuzz corpus.
func AssertGRPCError ¶
AssertGRPCError checks that actual error has the same gRPC error code and message as expected error.
func AssertGRPCErrorRE ¶ added in v1.5.1
func AssertGRPCErrorRE(tb testing.TB, expectedCode codes.Code, expectedMessageRE string, actual error)
AssertGRPCErrorRE checks that actual error has expected gRPC error code, and error messages matches expected regular expression.
func GenCredentials ¶
GenCredentials generates test user email and password.
func GetAWSKeys ¶
GetAWSKeys returns testing AWS keys.
func SetTestIDReader ¶
SetTestIDReader sets IDReader for duration of the test.
Types ¶
Click to show internal directories.
Click to hide internal directories.