test

package
v0.0.0-...-53b33ef Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlueDesiredCapacity

type BlueDesiredCapacity int32

type BlueHealthStates

type BlueHealthStates []albTypes.TargetHealthStateEnum

type BlueInstanceStates

type BlueInstanceStates []asgTypes.LifecycleState

type BlueMaxSize

type BlueMaxSize int32

type BlueMinSize

type BlueMinSize int32

type BlueWeight

type BlueWeight int32

type GreenDesiredCapacity

type GreenDesiredCapacity int32

type GreenHealthStates

type GreenHealthStates []albTypes.TargetHealthStateEnum

type GreenInstanceStates

type GreenInstanceStates []asgTypes.LifecycleState

type GreenMaxSize

type GreenMaxSize int32

type GreenMinSize

type GreenMinSize int32

type GreenWeight

type GreenWeight int32

type MockAwsClient

type MockAwsClient struct {
	State *TestingState
}

func NewMockAwsClient

func NewMockAwsClient(state *TestingState) *MockAwsClient

func (*MockAwsClient) CreateS3Bucket

func (c *MockAwsClient) CreateS3Bucket(_ context.Context, bucket string, _ string) error

func (*MockAwsClient) DeleteS3BucketObject

func (c *MockAwsClient) DeleteS3BucketObject(_ context.Context, bucket string, key string) error

func (*MockAwsClient) DeleteScheduledAction

func (c *MockAwsClient) DeleteScheduledAction(_ context.Context, autoScalingGroupName string, scheduledActionName string) error

func (*MockAwsClient) DescribeALBTargetGroup

func (c *MockAwsClient) DescribeALBTargetGroup(_ context.Context, targetGroupArn string) (*albTypes.TargetGroup, error)

func (*MockAwsClient) DescribeALBTargetHealth

func (c *MockAwsClient) DescribeALBTargetHealth(_ context.Context, targetGroupArn string) ([]albTypes.TargetHealthDescription, error)

func (*MockAwsClient) DescribeAutoScalingGroup

func (c *MockAwsClient) DescribeAutoScalingGroup(_ context.Context, name string) (*asgTypes.AutoScalingGroup, error)

func (*MockAwsClient) DescribeScheduledActions

func (c *MockAwsClient) DescribeScheduledActions(_ context.Context, name string) ([]asgTypes.ScheduledUpdateGroupAction, error)

func (*MockAwsClient) DisableS3BucketPublicAccess

func (c *MockAwsClient) DisableS3BucketPublicAccess(_ context.Context, bucket string) error

func (*MockAwsClient) EnableS3BucketVersioning

func (c *MockAwsClient) EnableS3BucketVersioning(_ context.Context, bucket string) error

func (*MockAwsClient) GetALBListenerRule

func (c *MockAwsClient) GetALBListenerRule(_ context.Context, listenerRuleArn string) (*albTypes.Rule, error)

func (*MockAwsClient) GetS3BucketObject

func (c *MockAwsClient) GetS3BucketObject(_ context.Context, bucket string, key string) (*s3.GetObjectOutput, error)

func (*MockAwsClient) GetSSMParameter

func (c *MockAwsClient) GetSSMParameter(_ context.Context, name string, withDecription bool) (*ssmTypes.Parameter, error)

func (*MockAwsClient) HeadS3Bucket

func (c *MockAwsClient) HeadS3Bucket(_ context.Context, bucket string) error

func (*MockAwsClient) ListS3BucketObjects

func (c *MockAwsClient) ListS3BucketObjects(_ context.Context, bucket string, prefix string) ([]s3Types.Object, error)

func (*MockAwsClient) MakeS3BucketAclPrivate

func (c *MockAwsClient) MakeS3BucketAclPrivate(_ context.Context, bucket string) error

func (*MockAwsClient) ModifyALBListenerRule

func (c *MockAwsClient) ModifyALBListenerRule(_ context.Context, listenerRuleArn string, forwardAction *albTypes.ForwardActionConfig) error

func (*MockAwsClient) PutS3BucketObjectAsBinaryFile

func (c *MockAwsClient) PutS3BucketObjectAsBinaryFile(_ context.Context, bucket string, key string, file *os.File) error

func (*MockAwsClient) PutS3BucketObjectAsTextFile

func (c *MockAwsClient) PutS3BucketObjectAsTextFile(_ context.Context, bucket string, key string, value string) error

func (*MockAwsClient) PutScheduledUpdateGroupAction

func (c *MockAwsClient) PutScheduledUpdateGroupAction(_ context.Context, name string, action *asgTypes.ScheduledUpdateGroupAction) error

func (*MockAwsClient) Region

func (c *MockAwsClient) Region() string

func (*MockAwsClient) UpdateAutoScalingGroup

func (c *MockAwsClient) UpdateAutoScalingGroup(_ context.Context, name string, desiredCapacity *int32, minSize *int32, maxSize *int32) error

type TestingAutoScalingGroup

type TestingAutoScalingGroup struct {
	*asgTypes.AutoScalingGroup
	ScheduledActions []asgTypes.ScheduledUpdateGroupAction
}

type TestingBucket

type TestingBucket struct {
	Name                   *string
	IsVersioningEnabled    *bool
	IsAclPrivated          *bool
	IsPublicAccessDisabled *bool
	Objects                []TestingBucketObject
}

type TestingBucketObject

type TestingBucketObject struct {
	LastModified *time.Time
	Key          *string
	Value        []byte
	ContentType  *string
}

type TestingLoadBalancer

type TestingLoadBalancer struct {
	ListenerRuleArn        *string
	TargetGroups           []TestingTargetGroup
	ForwardActionStickness *albTypes.TargetGroupStickinessConfig
}

func (*TestingLoadBalancer) FindTargetGroup

func (t *TestingLoadBalancer) FindTargetGroup(targetGroupArn string) *TestingTargetGroup

type TestingState

type TestingState struct {
	Bucket            *TestingBucket
	LoadBalancer      *TestingLoadBalancer
	AutoScalingGroups []TestingAutoScalingGroup
	// contains filtered or unexported fields
}

func NewTestingState

func NewTestingState(config *internal.Config) *TestingState

func (*TestingState) FindAutoScalingGroup

func (s *TestingState) FindAutoScalingGroup(name string) *TestingAutoScalingGroup

func (*TestingState) WithAutoScalingGroupScheduledAction

func (s *TestingState) WithAutoScalingGroupScheduledAction(
	blueAutoScalingGroupName string,
	blueScheduledActions []asgTypes.ScheduledUpdateGroupAction,
	greenAutoScalingGroupName string,
	greenScheduledACtions []asgTypes.ScheduledUpdateGroupAction,
) *TestingState

func (*TestingState) WithAutoScalingGroups

func (s *TestingState) WithAutoScalingGroups(
	blueDesiredCapacity BlueDesiredCapacity,
	blueMinSize BlueMinSize,
	blueMaxSize BlueMaxSize,
	blueStates BlueInstanceStates,
	greenDesiredCapacity GreenDesiredCapacity,
	greenMinSize GreenMinSize,
	greenMaxSize GreenMaxSize,
	greenStates GreenInstanceStates,
) *TestingState

func (*TestingState) WithBucket

func (s *TestingState) WithBucket(config *internal.Config) *TestingState

func (*TestingState) WithLoadBalancer

func (s *TestingState) WithLoadBalancer(
	blueWeight BlueWeight,
	blueStates BlueHealthStates,
	greenWeight GreenWeight,
	greenStates GreenHealthStates,
) *TestingState

type TestingTargetGroup

type TestingTargetGroup struct {
	*albTypes.TargetGroupTuple
	TargetGroupName *string
	HealthStates    []albTypes.TargetHealthStateEnum
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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