Documentation ¶
Index ¶
- func AWSRole() string
- func CheckAWSEnvVarsForECS(t *testing.T)
- func CheckAWSEnvVarsForECSAndSecretsManager(t *testing.T)
- func CheckAWSEnvVarsForSecretsManager(t *testing.T)
- func CheckEnvVars(t *testing.T, envVars ...string)
- func CleanupSecrets(ctx context.Context, t *testing.T, c cocoa.SecretsManagerClient)
- func CleanupTaskDefinitions(ctx context.Context, t *testing.T, c cocoa.ECSClient)
- func CleanupTasks(ctx context.Context, t *testing.T, c cocoa.ECSClient)
- func CreateSecret(ctx context.Context, t *testing.T, c cocoa.SecretsManagerClient, ...) secretsmanager.CreateSecretOutput
- func ECSCapacityProvider() string
- func ECSClusterName() string
- func ECSExecutionRole() string
- func ECSTaskRole() string
- func NewSecretName(t *testing.T) string
- func NewTaskDefinitionFamily(t *testing.T) string
- func RegisterTaskDefinition(ctx context.Context, t *testing.T, c cocoa.ECSClient, ...) ecs.RegisterTaskDefinitionOutput
- func SecretPrefix() string
- func TaskDefinitionPrefix() string
- func ValidIntegrationAWSOptions() awsutil.ClientOptions
- func ValidNonIntegrationAWSOptions() awsutil.ClientOptions
- func ValidRegisterTaskDefinitionInput(t *testing.T) ecs.RegisterTaskDefinitionInput
- type NoopECSPodDefinitionCache
- type NoopSecretCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AWSRole ¶
func AWSRole() string
AWSRole returns the AWS IAM role from the environment variable.
func CheckAWSEnvVarsForECS ¶
CheckAWSEnvVarsForECS checks that the required environment variables are defined for testing against AWS ECS.
func CheckAWSEnvVarsForECSAndSecretsManager ¶
CheckAWSEnvVarsForECSAndSecretsManager checks that the required environment variables are defined for testing against both AWS ECS and Secrets Manager.
func CheckAWSEnvVarsForSecretsManager ¶
CheckAWSEnvVarsForSecretsManager checks that the required environment variables are defined for testing against AWS Secrets Manager.
func CheckEnvVars ¶
CheckEnvVars checks that the required environment variables are set.
func CleanupSecrets ¶
CleanupSecrets cleans up all existing secrets used in a test.
func CleanupTaskDefinitions ¶
CleanupTaskDefinitions cleans up all existing task definitions used in a test.
func CleanupTasks ¶
CleanupTasks cleans up all tasks used in the Cocoa cluster.
func CreateSecret ¶
func CreateSecret(ctx context.Context, t *testing.T, c cocoa.SecretsManagerClient, in secretsmanager.CreateSecretInput) secretsmanager.CreateSecretOutput
CreateSecret is a convenience function for creating a Secrets Manager secret and verifying that the result is successful and populates the secret ARN.
func ECSCapacityProvider ¶
func ECSCapacityProvider() string
ECSCapacityProvider returns the ECS capacity provider from the environment variable.
func ECSClusterName ¶
func ECSClusterName() string
ECSClusterName returns the ECS cluster name from the environment variable.
func ECSExecutionRole ¶
func ECSExecutionRole() string
ECSExecutionRole returns the ECS execution role from the environment variable.
func ECSTaskRole ¶
func ECSTaskRole() string
ECSTaskRole returns the ECS task role from the environment variable.
func NewSecretName ¶
NewSecretName creates a new test secret name with a common prefix, the given test's name, and a random string.
func NewTaskDefinitionFamily ¶
NewTaskDefinitionFamily makes a new test family for a task definition with a common prefix, the given name, and a random string.
func RegisterTaskDefinition ¶
func RegisterTaskDefinition(ctx context.Context, t *testing.T, c cocoa.ECSClient, in ecs.RegisterTaskDefinitionInput) ecs.RegisterTaskDefinitionOutput
RegisterTaskDefinition is a convenience function for registering an ECS task definition and verifying that the result is successful and populates the task definition ARN.
func SecretPrefix ¶
func SecretPrefix() string
SecretPrefix returns the prefix name for secrets from the environment variable.
func TaskDefinitionPrefix ¶
func TaskDefinitionPrefix() string
TaskDefinitionPrefix returns the prefix name for task definitions from the environment variable.
func ValidIntegrationAWSOptions ¶
func ValidIntegrationAWSOptions() awsutil.ClientOptions
ValidIntegrationAWSOptions returns valid options to create an AWS client that can make actual requests to AWS for integration testing. Credentials and the region will be extracted automatically by the SDK from the standard environment variables.
func ValidNonIntegrationAWSOptions ¶
func ValidNonIntegrationAWSOptions() awsutil.ClientOptions
ValidNonIntegrationAWSOptions returns valid options to create an AWS client that doesn't make any actual requests to AWS.
func ValidRegisterTaskDefinitionInput ¶
func ValidRegisterTaskDefinitionInput(t *testing.T) ecs.RegisterTaskDefinitionInput
ValidRegisterTaskDefinitionInput returns a valid set of options for registering an ECS task definition.
Types ¶
type NoopECSPodDefinitionCache ¶
type NoopECSPodDefinitionCache struct {
Tag string
}
NoopECSPodDefinitionCache is an implementation of cocoa.ECSPodDefinitionCache that no-ops for all cache modification operations.
func (*NoopECSPodDefinitionCache) Delete ¶
func (c *NoopECSPodDefinitionCache) Delete(context.Context, string) error
Delete is a no-op.
func (*NoopECSPodDefinitionCache) GetTag ¶
func (c *NoopECSPodDefinitionCache) GetTag() string
GetTag returns the cache tag field.
func (*NoopECSPodDefinitionCache) Put ¶
func (c *NoopECSPodDefinitionCache) Put(context.Context, cocoa.ECSPodDefinitionItem) error
Put is a no-op.
type NoopSecretCache ¶
type NoopSecretCache struct {
Tag string
}
NoopSecretCache is an implementation of cocoa.SecretCache that no-ops for all cache modification operations.
func (*NoopSecretCache) Delete ¶
func (c *NoopSecretCache) Delete(context.Context, string) error
Delete is a no-op.
func (*NoopSecretCache) GetTag ¶
func (c *NoopSecretCache) GetTag() string
GetTag returns the cache tag field.
func (*NoopSecretCache) Put ¶
func (c *NoopSecretCache) Put(context.Context, cocoa.SecretCacheItem) error
Put is a no-op.