awstest

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// SQSFifoServiceName is the service name for SQS FIFO queues
	SQSFifoServiceName = sqs.ServiceName + fifoSuffix
)

Variables

This section is empty.

Functions

func AssertResourceExists

func AssertResourceExists(t *testing.T, name *string, r string) bool

AssertResourceExists asserts if the resource with the given name exists

func CreateResource

func CreateResource(r string) *string

CreateResource creates an AWS resource for testing purposes

func Endpoint

func Endpoint() string

func NewSession

func NewSession() *session.Session

NewSession creates a new AWS session, suited for testing

func NewSessionWithRegion

func NewSessionWithRegion(region string) *session.Session

NewSessionWithRegion creates a new AWS session configured for specific region, suited for testing

Types

type ResourceService

type ResourceService interface {
	// CreateResourceForSession creates a resource for testing purposes
	CreateResourceForSession(sess *session.Session, name *string) (*string, error)
	// AssertResourceExistsForSession check if a resource exists for a given session
	AssertResourceExistsForSession(sess *session.Session, name *string) (bool, error)
}

ResourceService isolates creation and checking existence by session for each supported resource

func GetResourceServiceByName

func GetResourceServiceByName(r string) ResourceService

GetResourceServiceByName returns a ResourceService if it's supported

Jump to

Keyboard shortcuts

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