Help us shape the future of Go! Take the 2026 Go Developer Survey

fixtures

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package fixtures provides test fixtures for LocalStack integration tests

Index

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) 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

Jump to

Keyboard shortcuts

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