Documentation
¶
Overview ¶
Package fixtures provides test fixtures for LocalStack integration tests
Index ¶
- type TestFixtures
- func (f *TestFixtures) GetAMIForTemplate(templateOS, arch string) (string, error)
- func (f *TestFixtures) HasSSMParameters(t *testing.T) bool
- func (f *TestFixtures) LaunchTestInstance(t *testing.T, name string) string
- func (f *TestFixtures) TerminateTestInstance(t *testing.T, instanceID string)
- func (f *TestFixtures) VerifyAMIsExist(t *testing.T)
- func (f *TestFixtures) VerifyEFSSetup(t *testing.T)
- func (f *TestFixtures) VerifyNetworkSetup(t *testing.T)
- func (f *TestFixtures) VerifySSMParameters(t *testing.T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestFixtures ¶
type TestFixtures struct {
Config *localstack.Config
EC2Client *ec2.Client
EFSClient *efs.Client
SSMClient *ssm.Client
}
TestFixtures holds LocalStack test resources
func NewTestFixtures ¶
func NewTestFixtures(t *testing.T) *TestFixtures
NewTestFixtures creates test fixtures for LocalStack tests This loads the LocalStack configuration and creates AWS clients
func (*TestFixtures) GetAMIForTemplate ¶
func (f *TestFixtures) GetAMIForTemplate(templateOS, arch string) (string, error)
GetAMIForTemplate returns the appropriate AMI ID for a template test This maps template requirements to LocalStack mock AMIs
func (*TestFixtures) HasSSMParameters ¶ added in v0.8.8
func (f *TestFixtures) HasSSMParameters(t *testing.T) bool
HasSSMParameters returns true if the canonical Ubuntu SSM parameter was successfully seeded. LocalStack Community may restrict writes to the /aws/service/ namespace.
func (*TestFixtures) LaunchTestInstance ¶
func (f *TestFixtures) LaunchTestInstance(t *testing.T, name string) string
LaunchTestInstance launches a test EC2 instance in LocalStack This is a low-level helper for testing EC2 operations directly
func (*TestFixtures) TerminateTestInstance ¶
func (f *TestFixtures) TerminateTestInstance(t *testing.T, instanceID string)
TerminateTestInstance terminates a test instance (used for cleanup)
func (*TestFixtures) VerifyAMIsExist ¶
func (f *TestFixtures) VerifyAMIsExist(t *testing.T)
VerifyAMIsExist verifies that all AMIs are available
func (*TestFixtures) VerifyEFSSetup ¶
func (f *TestFixtures) VerifyEFSSetup(t *testing.T)
VerifyEFSSetup verifies that EFS file system and mount targets exist
func (*TestFixtures) VerifyNetworkSetup ¶
func (f *TestFixtures) VerifyNetworkSetup(t *testing.T)
VerifyNetworkSetup verifies that VPC, subnets, and security groups exist
func (*TestFixtures) VerifySSMParameters ¶
func (f *TestFixtures) VerifySSMParameters(t *testing.T)
VerifySSMParameters verifies that SSM parameters for AMI discovery exist