From 18e6b6e66ff440bf1c8b492e6c0bb41d68f7bd83 Mon Sep 17 00:00:00 2001 From: Luc Talatinian <102624213+lucix-aws@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:42:22 -0400 Subject: [PATCH] remove autoscaling smoke tests (#2817) --- .../1c952ab466374a358faf03c5f6a561d8.json | 8 +++ .../integrationtest/autoscaling/smoke_test.go | 66 ------------------- 2 files changed, 8 insertions(+), 66 deletions(-) create mode 100644 .changelog/1c952ab466374a358faf03c5f6a561d8.json delete mode 100644 service/internal/integrationtest/autoscaling/smoke_test.go diff --git a/.changelog/1c952ab466374a358faf03c5f6a561d8.json b/.changelog/1c952ab466374a358faf03c5f6a561d8.json new file mode 100644 index 00000000000..3acbd987598 --- /dev/null +++ b/.changelog/1c952ab466374a358faf03c5f6a561d8.json @@ -0,0 +1,8 @@ +{ + "id": "1c952ab4-6637-4a35-8faf-03c5f6a561d8", + "type": "bugfix", + "description": "Remove integration tests for autoscaling APIs.", + "modules": [ + "service/internal/integrationtest" + ] +} \ No newline at end of file diff --git a/service/internal/integrationtest/autoscaling/smoke_test.go b/service/internal/integrationtest/autoscaling/smoke_test.go deleted file mode 100644 index b1fbe911012..00000000000 --- a/service/internal/integrationtest/autoscaling/smoke_test.go +++ /dev/null @@ -1,66 +0,0 @@ -//go:build integration -// +build integration - -package autoscaling - -import ( - "context" - "errors" - "testing" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/autoscaling" - - "github.com/aws/aws-sdk-go-v2/service/internal/integrationtest" - "github.com/aws/smithy-go" -) - -func TestInteg_00_DescribeScalingProcessTypes(t *testing.T) { - ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second) - defer cancelFn() - - cfg, err := integrationtest.LoadConfigWithDefaultRegion("us-west-2") - if err != nil { - t.Fatalf("failed to load config, %v", err) - } - - client := autoscaling.NewFromConfig(cfg) - params := &autoscaling.DescribeScalingProcessTypesInput{} - _, err = client.DescribeScalingProcessTypes(ctx, params) - if err != nil { - t.Errorf("expect no error, got %v", err) - } -} - -func TestInteg_01_CreateLaunchConfiguration(t *testing.T) { - ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second) - defer cancelFn() - - cfg, err := integrationtest.LoadConfigWithDefaultRegion("us-west-2") - if err != nil { - t.Fatalf("failed to load config, %v", err) - } - - client := autoscaling.NewFromConfig(cfg) - params := &autoscaling.CreateLaunchConfigurationInput{ - ImageId: aws.String("ami-12345678"), - InstanceType: aws.String("m1.small"), - LaunchConfigurationName: aws.String("hello, world"), - } - _, err = client.CreateLaunchConfiguration(ctx, params) - if err == nil { - t.Fatalf("expect request to fail") - } - - var apiErr smithy.APIError - if !errors.As(err, &apiErr) { - t.Fatalf("expect error to be API error, was not, %v", err) - } - if len(apiErr.ErrorCode()) == 0 { - t.Errorf("expect non-empty error code") - } - if len(apiErr.ErrorMessage()) == 0 { - t.Errorf("expect non-empty error message") - } -}