Documentation
¶
Index ¶
- Variables
- func ContextTransactionID() *http.Request
- func CopyToS3(t *testing.T, src string) (string, func())
- func CopyToTemporaryDirectory(t *testing.T, src string) (string, func())
- func CreateZipsInS3(t *testing.T, zipInputs ...ZipInput) (string, func())
- func CryptoRandInt31() int32
- func CryptoRandInt63() int64
- func DeleteParameters(t *testing.T, input *ssm.DeleteParametersInput) error
- func GetFileFromZip(t *testing.T, zipReader *zip.Reader, filename string) *zip.File
- func GetLogger(logger logrus.FieldLogger) *logrus.Logger
- func GetRandomIPV4Address(t *testing.T) string
- func GetSQSEvent(t *testing.T, bucketName string, fileName string) events.SQSEvent
- func ListS3Objects(t *testing.T, bucket string, prefix string) []*s3.Object
- func MakeDirToDelete(s suite.Suite, filePath string)
- func MakeTestServerWithAuthTokenRequestTimeout() *httptest.Server
- func MakeTestServerWithBadAuthTokenRequest() *httptest.Server
- func MakeTestServerWithBadRequest() *httptest.Server
- func MakeTestServerWithInternalServerErrAuthTokenRequest() *httptest.Server
- func MakeTestServerWithIntrospectEndpoint(activeToken bool) *httptest.Server
- func MakeTestServerWithIntrospectReturn502() *httptest.Server
- func MakeTestServerWithIntrospectTimeout() *httptest.Server
- func MakeTestServerWithInvalidAuthTokenRequest() *httptest.Server
- func MakeTestServerWithInvalidCarriage() *httptest.Server
- func MakeTestServerWithInvalidTokenRequest() *httptest.Server
- func MakeTestServerWithTokenRequestTimeout() *httptest.Server
- func MakeTestServerWithValidAuthTokenRequest() *httptest.Server
- func MakeTestServerWithValidTokenRequest() *httptest.Server
- func PrintSeparator()
- func PutParameter(t *testing.T, input *ssm.PutParameterInput) error
- func RandomBase64(n int) string
- func RandomHexID() string
- func RandomMBI(t *testing.T) string
- func ReadResponseBody(r *http.Response) string
- func SetAndRestoreEnvKey(key, value string) func()
- func SetEnvVars(t *testing.T, vars []EnvVar) func()
- func SetParameters(t *testing.T, params []AwsParameter) func()
- func SetPendingDeletionDir(s suite.Suite, path string)
- type AwsParameter
- type EnvVar
- type ZipInput
Constants ¶
This section is empty.
Variables ¶
CtxMatcher allow us to validate that the caller supplied a context.Context argument See: https://github.com/stretchr/testify/issues/519
Functions ¶
func ContextTransactionID ¶
func CopyToS3 ¶
CopyToS3 copies all of the content found at src into a temporary S3 folder within localstack. The path to the temporary S3 directory is returned along with a function that can be called to clean up the data.
func CopyToTemporaryDirectory ¶
CopyToTemporaryDirectory copies all of the content found at src into a temporary directory. The path to the temporary directory is returned along with a function that can be called to clean up the data.
func CryptoRandInt31 ¶
func CryptoRandInt31() int32
func CryptoRandInt63 ¶
func CryptoRandInt63() int64
func DeleteParameters ¶
func DeleteParameters(t *testing.T, input *ssm.DeleteParametersInput) error
Deletes the provided parameters from localstack.
func GetFileFromZip ¶
func GetLogger ¶
func GetLogger(logger logrus.FieldLogger) *logrus.Logger
GetLogger returns the underlying implementation of the field logger
func GetRandomIPV4Address ¶
GetRandomIPV4Address returns a random IPV4 address using rand.Read() to generate the values.
func GetSQSEvent ¶
func MakeDirToDelete ¶
func MakeTestServerWithIntrospectEndpoint ¶
MakeTestServerWithIntrospectEndpoint creates an httptest.Server with an introspect endpoint that will return back a response with a json body indicating if "active" is set to true or false (set by active token parameter)
func MakeTestServerWithIntrospectReturn502 ¶
MakeTestServerWithIntrospectReturn502 creates an httptest.Server with an introspect endpoint that will return 502 Status Code.
func MakeTestServerWithIntrospectTimeout ¶
MakeTestServerWithIntrospectTimeout creates an httptest.Server with an introspect endpoint that will sleep for 10 seconds. Useful in testing where the env timeout is set to something less (ex. 5 seconds) and you want to ensure *url.Error.Timeout() returns true.
func PutParameter ¶
func PutParameter(t *testing.T, input *ssm.PutParameterInput) error
Inserts the provided parameter into localstack.
func RandomBase64 ¶
func RandomHexID ¶
func RandomHexID() string
func ReadResponseBody ¶
ReadResponseBody will read http.Response and return the body contents as a string.
func SetAndRestoreEnvKey ¶
func SetAndRestoreEnvKey(key, value string) func()
SetAndRestoreEnvKey replaces the current value of the env var key, returning a function which can be used to restore the original value
func SetEnvVars ¶
Update all given environment variables and return a method for deferring cleanup.
func SetParameters ¶
func SetParameters(t *testing.T, params []AwsParameter) func()
Insert all given parameters into localstack and return a method for deferring cleanup.
func SetPendingDeletionDir ¶
SetPendingDeletionDir sets the PENDING_DELETION_DIR to the supplied "path" and ensures that the directory is created