Skip to content

Commit

Permalink
Remove g2.xlarge from instance type tests
Browse files Browse the repository at this point in the history
`g2.xlarge` is EOL and has weird data, so it's expected that the
tests choke on it if expecting to get sane data out.
  • Loading branch information
kanwren committed Aug 7, 2024
1 parent b7c738d commit a98c0a2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 41 deletions.
2 changes: 1 addition & 1 deletion hack/code/instancetype_testdata_gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func main() {
if err := os.Setenv("AWS_SDK_LOAD_CONFIG", "true"); err != nil {
log.Fatalf("setting AWS_SDK_LOAD_CONFIG, %s", err)
}
if err := os.Setenv("AWS_REGION", "us-west-2"); err != nil {
if err := os.Setenv("AWS_REGION", "us-east-1"); err != nil {
log.Fatalf("setting AWS_REGION, %s", err)
}
ctx := context.Background()
Expand Down
2 changes: 1 addition & 1 deletion hack/codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ instanceTypeTestData() {
GENERATED_FILE="pkg/fake/zz_generated.describe_instance_types.go"

go run hack/code/instancetype_testdata_gen/main.go --out-file ${GENERATED_FILE} \
--instance-types t3.large,m5.large,m5.xlarge,p3.8xlarge,g4dn.8xlarge,c6g.large,inf1.2xlarge,inf1.6xlarge,trn1.2xlarge,m5.metal,dl1.24xlarge,m6idn.32xlarge,t4g.small,t4g.xlarge,t4g.medium,g4ad.16xlarge,g2.xlarge
--instance-types t3.large,m5.large,m5.xlarge,p3.8xlarge,g4dn.8xlarge,c6g.large,inf1.2xlarge,inf1.6xlarge,trn1.2xlarge,m5.metal,dl1.24xlarge,m6idn.32xlarge,t4g.small,t4g.xlarge,t4g.medium,g4ad.16xlarge

checkForUpdates "${GENERATED_FILE}"
}
Expand Down
39 changes: 0 additions & 39 deletions pkg/fake/zz_generated.describe_instance_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,45 +145,6 @@ var defaultDescribeInstanceTypesOutput = &ec2.DescribeInstanceTypesOutput{
},
},
},
{
InstanceType: aws.String("g2.xlarge"),
SupportedUsageClasses: aws.StringSlice([]string{}),
SupportedVirtualizationTypes: aws.StringSlice([]string{"hvm"}),
BurstablePerformanceSupported: aws.Bool(false),
BareMetal: aws.Bool(false),
Hypervisor: aws.String("xen"),
ProcessorInfo: &ec2.ProcessorInfo{
Manufacturer: aws.String("Other"),
SupportedArchitectures: aws.StringSlice([]string{"x86_64"}),
},
VCpuInfo: &ec2.VCpuInfo{
DefaultCores: aws.Int64(0),
DefaultVCpus: aws.Int64(4),
},
MemoryInfo: &ec2.MemoryInfo{
SizeInMiB: aws.Int64(0),
},
EbsInfo: &ec2.EbsInfo{
EbsOptimizedSupport: aws.String("default"),
EncryptionSupport: aws.String("supported"),
NvmeSupport: aws.String("required"),
},
InstanceStorageInfo: &ec2.InstanceStorageInfo{NvmeSupport: aws.String("unsupported"),
TotalSizeInGB: aws.Int64(0),
},
NetworkInfo: &ec2.NetworkInfo{
MaximumNetworkInterfaces: aws.Int64(4),
Ipv4AddressesPerInterface: aws.Int64(15),
EncryptionInTransitSupported: aws.Bool(false),
DefaultNetworkCardIndex: aws.Int64(0),
NetworkCards: []*ec2.NetworkCardInfo{
{
NetworkCardIndex: aws.Int64(0),
MaximumNetworkInterfaces: aws.Int64(4),
},
},
},
},
{
InstanceType: aws.String("g4ad.16xlarge"),
SupportedUsageClasses: aws.StringSlice([]string{"on-demand", "spot"}),
Expand Down

0 comments on commit a98c0a2

Please sign in to comment.