From bd92e5e52277aa1da501625490587ae1b810c07f Mon Sep 17 00:00:00 2001 From: Luc Talatinian <102624213+lucix-aws@users.noreply.github.com> Date: Thu, 25 Jul 2024 14:47:39 -0400 Subject: [PATCH] remove integration test broken by cloudsearch service (#2725) --- .../57a9ebc91d4d4f0a97ef1da30dfaea11.json | 8 +++ .../integrationtest/cloudsearch/smoke_test.go | 64 ------------------- 2 files changed, 8 insertions(+), 64 deletions(-) create mode 100644 .changelog/57a9ebc91d4d4f0a97ef1da30dfaea11.json delete mode 100644 service/internal/integrationtest/cloudsearch/smoke_test.go diff --git a/.changelog/57a9ebc91d4d4f0a97ef1da30dfaea11.json b/.changelog/57a9ebc91d4d4f0a97ef1da30dfaea11.json new file mode 100644 index 00000000000..24f7d1b7637 --- /dev/null +++ b/.changelog/57a9ebc91d4d4f0a97ef1da30dfaea11.json @@ -0,0 +1,8 @@ +{ + "id": "57a9ebc9-1d4d-4f0a-97ef-1da30dfaea11", + "type": "bugfix", + "description": "Remove integration test broken by cloudsearch service.", + "modules": [ + "service/internal/integrationtest" + ] +} \ No newline at end of file diff --git a/service/internal/integrationtest/cloudsearch/smoke_test.go b/service/internal/integrationtest/cloudsearch/smoke_test.go deleted file mode 100644 index c4f1463bf0b..00000000000 --- a/service/internal/integrationtest/cloudsearch/smoke_test.go +++ /dev/null @@ -1,64 +0,0 @@ -//go:build integration -// +build integration - -package cloudsearch - -import ( - "context" - "errors" - "testing" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/cloudsearch" - - "github.com/aws/aws-sdk-go-v2/service/internal/integrationtest" - "github.com/aws/smithy-go" -) - -func TestInteg_00_DescribeDomains(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 := cloudsearch.NewFromConfig(cfg) - params := &cloudsearch.DescribeDomainsInput{} - _, err = client.DescribeDomains(ctx, params) - if err != nil { - t.Errorf("expect no error, got %v", err) - } -} - -func TestInteg_01_DescribeIndexFields(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 := cloudsearch.NewFromConfig(cfg) - params := &cloudsearch.DescribeIndexFieldsInput{ - DomainName: aws.String("fakedomain"), - } - _, err = client.DescribeIndexFields(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") - } -}