Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateTestDimensions(provisionedNodeCount, deprovisionedNodeCount, podDensity int) map[string]string
- func GetCloudWatchAPI(session *session.Session) cloudwatchiface.CloudWatchAPI
- type Environment
- func (env *Environment) AfterEach()
- func (env *Environment) BeforeEach()
- func (env *Environment) Cleanup()
- func (env *Environment) ExpectAccountID() string
- func (env *Environment) ExpectEventDurationMetric(d time.Duration, labels map[string]string)
- func (env *Environment) ExpectExperimentTemplateDeleted(id string)
- func (env *Environment) ExpectIPv6ClusterDNS() string
- func (env *Environment) ExpectInstance(nodeName string) Assertion
- func (env *Environment) ExpectInstanceStopped(nodeName string)
- func (env *Environment) ExpectInstanceTerminated(nodeName string)
- func (env *Environment) ExpectMessagesCreated(msgs ...interface{})
- func (env *Environment) ExpectMetric(name string, unit string, value float64, labels map[string]string)
- func (env *Environment) ExpectParsedProviderID(providerID string) string
- func (env *Environment) ExpectQueueExists()
- func (env *Environment) ExpectRunInstances(instanceInput *ec2.RunInstancesInput) *ec2.Reservation
- func (env *Environment) ExpectSpotInterruptionExperiment(instanceIDs ...string) *fis.Experiment
- func (env *Environment) ExpectSpotInterruptionRole() *iam.Role
- func (env *Environment) ExpectWindowsIPAMDisabled()
- func (env *Environment) ExpectWindowsIPAMEnabled()
- func (env *Environment) GetCustomAMI(amiPath string, versionOffset int) string
- func (env *Environment) GetInstance(nodeName string) ec2.Instance
- func (env *Environment) GetInstanceByID(instanceID string) ec2.Instance
- func (env *Environment) GetInstanceByIDWithOffset(offset int, instanceID string) ec2.Instance
- func (env *Environment) GetSecurityGroups(tags map[string]string) []SecurityGroup
- func (env *Environment) GetSubnetNameAndIds(tags map[string]string) []SubnetInfo
- func (env *Environment) GetSubnets(tags map[string]string) map[string][]string
- func (env *Environment) GetVolume(volumeID *string) ec2.Volume
- func (env *Environment) MeasureDurationFor(f func(), eventType EventType, group, name string, ...)
- type EventType
- type NoOpCloudwatchAPI
- type SecurityGroup
- type SubnetInfo
Constants ¶
View Source
const ( TestEventTypeDimension = "eventType" TestSubEventTypeDimension = "subEventType" TestGroupDimension = "group" TestNameDimension = "name" GitRefDimension = "gitRef" DeprovisionedNodeCountDimension = "deprovisionedNodeCount" ProvisionedNodeCountDimension = "provisionedNodeCount" PodDensityDimension = "podDensity" )
View Source
const WindowsDefaultImage = "mcr.microsoft.com/oss/kubernetes/pause:3.9"
Variables ¶
View Source
var ( CleanableObjects = []functional.Pair[client.Object, client.ObjectList]{ {First: &v1alpha1.AWSNodeTemplate{}, Second: &v1alpha1.AWSNodeTemplateList{}}, } )
Functions ¶
func GenerateTestDimensions ¶
func GetCloudWatchAPI ¶
func GetCloudWatchAPI(session *session.Session) cloudwatchiface.CloudWatchAPI
Types ¶
type Environment ¶
type Environment struct { *common.Environment Region string STSAPI *sts.STS EC2API *ec2.EC2 SSMAPI *ssm.SSM IAMAPI *iam.IAM FISAPI *fis.FIS EKSAPI *eks.EKS CloudwatchAPI cloudwatchiface.CloudWatchAPI SQSProvider *interruption.SQSProvider }
func NewEnvironment ¶
func NewEnvironment(t *testing.T) *Environment
func (*Environment) AfterEach ¶
func (env *Environment) AfterEach()
func (*Environment) BeforeEach ¶
func (env *Environment) BeforeEach()
func (*Environment) Cleanup ¶
func (env *Environment) Cleanup()
func (*Environment) ExpectAccountID ¶
func (env *Environment) ExpectAccountID() string
func (*Environment) ExpectEventDurationMetric ¶
func (env *Environment) ExpectEventDurationMetric(d time.Duration, labels map[string]string)
func (*Environment) ExpectExperimentTemplateDeleted ¶
func (env *Environment) ExpectExperimentTemplateDeleted(id string)
func (*Environment) ExpectIPv6ClusterDNS ¶
func (env *Environment) ExpectIPv6ClusterDNS() string
func (*Environment) ExpectInstance ¶
func (env *Environment) ExpectInstance(nodeName string) Assertion
func (*Environment) ExpectInstanceStopped ¶
func (env *Environment) ExpectInstanceStopped(nodeName string)
func (*Environment) ExpectInstanceTerminated ¶
func (env *Environment) ExpectInstanceTerminated(nodeName string)
func (*Environment) ExpectMessagesCreated ¶
func (env *Environment) ExpectMessagesCreated(msgs ...interface{})
func (*Environment) ExpectMetric ¶
func (*Environment) ExpectParsedProviderID ¶
func (env *Environment) ExpectParsedProviderID(providerID string) string
func (*Environment) ExpectQueueExists ¶
func (env *Environment) ExpectQueueExists()
func (*Environment) ExpectRunInstances ¶
func (env *Environment) ExpectRunInstances(instanceInput *ec2.RunInstancesInput) *ec2.Reservation
func (*Environment) ExpectSpotInterruptionExperiment ¶
func (env *Environment) ExpectSpotInterruptionExperiment(instanceIDs ...string) *fis.Experiment
func (*Environment) ExpectSpotInterruptionRole ¶
func (env *Environment) ExpectSpotInterruptionRole() *iam.Role
func (*Environment) ExpectWindowsIPAMDisabled ¶
func (env *Environment) ExpectWindowsIPAMDisabled()
func (*Environment) ExpectWindowsIPAMEnabled ¶
func (env *Environment) ExpectWindowsIPAMEnabled()
func (*Environment) GetCustomAMI ¶
func (env *Environment) GetCustomAMI(amiPath string, versionOffset int) string
func (*Environment) GetInstance ¶
func (env *Environment) GetInstance(nodeName string) ec2.Instance
func (*Environment) GetInstanceByID ¶
func (env *Environment) GetInstanceByID(instanceID string) ec2.Instance
func (*Environment) GetInstanceByIDWithOffset ¶
func (env *Environment) GetInstanceByIDWithOffset(offset int, instanceID string) ec2.Instance
func (*Environment) GetSecurityGroups ¶
func (env *Environment) GetSecurityGroups(tags map[string]string) []SecurityGroup
GetSecurityGroups returns all getSecurityGroups matching the label selector
func (*Environment) GetSubnetNameAndIds ¶
func (env *Environment) GetSubnetNameAndIds(tags map[string]string) []SubnetInfo
GetSubnetNameAndIds returns all subnets matching the label selector
func (*Environment) GetSubnets ¶
func (env *Environment) GetSubnets(tags map[string]string) map[string][]string
GetSubnets returns all subnets matching the label selector mapped from AZ -> {subnet-ids...}
func (*Environment) MeasureDurationFor ¶
func (env *Environment) MeasureDurationFor(f func(), eventType EventType, group, name string, additionalLabels map[string]string)
MeasureDurationFor observes the duration between the beginning of the function f() and the end of the function f()
type NoOpCloudwatchAPI ¶
type NoOpCloudwatchAPI struct {
cloudwatch.CloudWatch
}
func (NoOpCloudwatchAPI) PutMetricData ¶
func (o NoOpCloudwatchAPI) PutMetricData(_ *cloudwatch.PutMetricDataInput) (*cloudwatch.PutMetricDataOutput, error)
type SecurityGroup ¶
type SecurityGroup struct { ec2.GroupIdentifier Tags []*ec2.Tag }
type SubnetInfo ¶
SubnetInfo is a simple struct for testing
Click to show internal directories.
Click to hide internal directories.