@@ -5,15 +5,11 @@ package waf
55
66import (
77 "context"
8- "errors"
98 "testing"
109 "time"
1110
12- "github.com/aws/aws-sdk-go-v2/aws"
13- "github.com/aws/aws-sdk-go-v2/service/waf"
14- "github.com/aws/smithy-go"
15-
1611 "github.com/aws/aws-sdk-go-v2/service/internal/integrationtest"
12+ "github.com/aws/aws-sdk-go-v2/service/waf"
1713)
1814
1915func TestInteg_00_ListRules (t * testing.T ) {
@@ -34,34 +30,3 @@ func TestInteg_00_ListRules(t *testing.T) {
3430 t .Errorf ("expect no error, got %v" , err )
3531 }
3632}
37-
38- func TestInteg_01_CreateSqlInjectionMatchSet (t * testing.T ) {
39- ctx , cancelFn := context .WithTimeout (context .Background (), 5 * time .Second )
40- defer cancelFn ()
41-
42- cfg , err := integrationtest .LoadConfigWithDefaultRegion ("us-west-2" )
43- if err != nil {
44- t .Fatalf ("failed to load config, %v" , err )
45- }
46-
47- client := waf .NewFromConfig (cfg )
48- params := & waf.CreateSqlInjectionMatchSetInput {
49- ChangeToken : aws .String ("fake_token" ),
50- Name : aws .String ("fake_name" ),
51- }
52- _ , err = client .CreateSqlInjectionMatchSet (ctx , params )
53- if err == nil {
54- t .Fatalf ("expect request to fail" )
55- }
56-
57- var apiErr smithy.APIError
58- if ! errors .As (err , & apiErr ) {
59- t .Fatalf ("expect error to be API error, was not, %v" , err )
60- }
61- if len (apiErr .ErrorCode ()) == 0 {
62- t .Errorf ("expect non-empty error code" )
63- }
64- if len (apiErr .ErrorMessage ()) == 0 {
65- t .Errorf ("expect non-empty error message" )
66- }
67- }
0 commit comments