module

package
v0.0.0-...-bde300a Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

Variables

View Source
var (
	AccountName   = util.GetEnvVariable("AWS_PROFILE_NAME")
	AccountId     = util.GetEnvVariable("AWS_ACCOUNT_ID")
	AccountRegion = util.GetEnvVariable("AWS_REGION_NAME")
	DomainName    = fmt.Sprintf("%s.%s", util.GetEnvVariable("DOMAIN_NAME"), util.GetEnvVariable("DOMAIN_SUFFIX"))
)
View Source
var (
	// for amazon 2023 at least
	T3Small = EC2Instance{
		Name:          "t3.small",
		Cpu:           2048,
		Memory:        2048,
		MemoryAllowed: 1801,
		Architecture:  "x86_64",
	}
	T3Medium = EC2Instance{
		Name:          "t3.medium",
		Cpu:           2048,
		Memory:        4096,
		MemoryAllowed: 3828,
		Architecture:  "x86_64",
	}
)

Functions

func SetupOptionsMicroservice

func SetupOptionsMicroservice(t *testing.T, projectName, serviceName string) (*terraform.Options, string)

func TestEcr

func TestEcr(t *testing.T, accountRegion, organization, repository, branch string)

func TestGroup

func TestGroup(t *testing.T, accountRegion, groupName string, userNames []string) *string

func TestRestEndpoints

func TestRestEndpoints(t *testing.T, endpoints []EndpointTest)

func TestRole

func TestRole(t *testing.T, accountRegion, roleName string) *string

func TestUser

func TestUser(t *testing.T, accountRegion, userName string) *string

func ValidateEcs

func ValidateEcs(t *testing.T, accountRegion, clusterName, serviceName string, serviceCount int64)

https://github.com/gruntwork-io/terratest/blob/master/test/terraform_aws_ecs_example_test.go

func ValidateGroup

func ValidateGroup(t *testing.T, accountRegion, prefixName string, group GroupInfo)

func ValidateLevel

func ValidateLevel(t *testing.T, accountRegion, prefixName string, groups ...GroupInfo)

func ValidateMicroservice

func ValidateMicroservice(t *testing.T, commonName string, microservicePath string, githubProject GithubProjectInformation, endpoints []EndpointTest)

Types

type EC2Instance

type EC2Instance struct {
	Name          string
	Cpu           int
	Memory        int
	MemoryAllowed int
	Architecture  string
}

type EndpointTest

type EndpointTest struct {
	Path                string
	ExpectedStatus      int
	ExpectedBody        *string
	MaxRetries          int
	SleepBetweenRetries time.Duration
}

type GithubProjectInformation

type GithubProjectInformation struct {
	Organization string
	Repository   string
	Branch       string
	// WorkflowFilename string
	// WorkflowName     string
	HealthCheckPath string
	ImageTag        string
}

type GroupInfo

type GroupInfo struct {
	Name                string
	Users               []map[string]any
	ExternalAssumeRoles []string
}

Jump to

Keyboard shortcuts

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