From 66251136b55d3a64355b88883f226f1d24a40bc7 Mon Sep 17 00:00:00 2001 From: Sean McGrail Date: Tue, 18 Jan 2022 23:59:11 +0000 Subject: [PATCH] Remove negative smoke test for WAF (#1564) --- .../integrationtest/waf/smoke_test.go | 37 +------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/service/internal/integrationtest/waf/smoke_test.go b/service/internal/integrationtest/waf/smoke_test.go index 2ba327faa77..c606b36b112 100644 --- a/service/internal/integrationtest/waf/smoke_test.go +++ b/service/internal/integrationtest/waf/smoke_test.go @@ -5,15 +5,11 @@ package waf import ( "context" - "errors" "testing" "time" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/waf" - "github.com/aws/smithy-go" - "github.com/aws/aws-sdk-go-v2/service/internal/integrationtest" + "github.com/aws/aws-sdk-go-v2/service/waf" ) func TestInteg_00_ListRules(t *testing.T) { @@ -34,34 +30,3 @@ func TestInteg_00_ListRules(t *testing.T) { t.Errorf("expect no error, got %v", err) } } - -func TestInteg_01_CreateSqlInjectionMatchSet(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 := waf.NewFromConfig(cfg) - params := &waf.CreateSqlInjectionMatchSetInput{ - ChangeToken: aws.String("fake_token"), - Name: aws.String("fake_name"), - } - _, err = client.CreateSqlInjectionMatchSet(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") - } -}