diff --git a/.changelog/78a150058fc64beb866a236d2c44a071.json b/.changelog/78a150058fc64beb866a236d2c44a071.json new file mode 100644 index 00000000000..403d562226e --- /dev/null +++ b/.changelog/78a150058fc64beb866a236d2c44a071.json @@ -0,0 +1,15 @@ +{ + "id": "78a15005-8fc6-4beb-866a-236d2c44a071", + "type": "feature", + "collapse": true, + "description": "Drop dependency on go-cmp in protocol tests.", + "modules": [ + "internal/protocoltest/awsrestjson", + "internal/protocoltest/ec2query", + "internal/protocoltest/jsonrpc", + "internal/protocoltest/jsonrpc10", + "internal/protocoltest/query", + "internal/protocoltest/restxml", + "internal/protocoltest/restxmlwithnamespace" + ] +} \ No newline at end of file diff --git a/internal/protocoltest/awsrestjson/api_op_DatetimeOffsets_test.go b/internal/protocoltest/awsrestjson/api_op_DatetimeOffsets_test.go index 188dc7ebbcd..4ee5df72c53 100644 --- a/internal/protocoltest/awsrestjson/api_op_DatetimeOffsets_test.go +++ b/internal/protocoltest/awsrestjson/api_op_DatetimeOffsets_test.go @@ -6,17 +6,13 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -105,19 +101,7 @@ func TestClient_DatetimeOffsets_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_DocumentTypeAsPayload_test.go b/internal/protocoltest/awsrestjson/api_op_DocumentTypeAsPayload_test.go index f0fc51708f7..a6c5187aadd 100644 --- a/internal/protocoltest/awsrestjson/api_op_DocumentTypeAsPayload_test.go +++ b/internal/protocoltest/awsrestjson/api_op_DocumentTypeAsPayload_test.go @@ -8,17 +8,13 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/document" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -228,19 +224,7 @@ func TestClient_DocumentTypeAsPayload_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_DocumentType_test.go b/internal/protocoltest/awsrestjson/api_op_DocumentType_test.go index 902792c0fd0..b2f3a1e5483 100644 --- a/internal/protocoltest/awsrestjson/api_op_DocumentType_test.go +++ b/internal/protocoltest/awsrestjson/api_op_DocumentType_test.go @@ -8,18 +8,14 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/document" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -389,19 +385,7 @@ func TestClient_DocumentType_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_EmptyInputAndEmptyOutput_test.go b/internal/protocoltest/awsrestjson/api_op_EmptyInputAndEmptyOutput_test.go index 29f4341799f..1fa91b9d826 100644 --- a/internal/protocoltest/awsrestjson/api_op_EmptyInputAndEmptyOutput_test.go +++ b/internal/protocoltest/awsrestjson/api_op_EmptyInputAndEmptyOutput_test.go @@ -7,17 +7,13 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -193,19 +189,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_FractionalSeconds_test.go b/internal/protocoltest/awsrestjson/api_op_FractionalSeconds_test.go index c6adeb00db4..161d8051e27 100644 --- a/internal/protocoltest/awsrestjson/api_op_FractionalSeconds_test.go +++ b/internal/protocoltest/awsrestjson/api_op_FractionalSeconds_test.go @@ -6,17 +6,13 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -94,19 +90,7 @@ func TestClient_FractionalSeconds_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_GreetingWithErrors_test.go b/internal/protocoltest/awsrestjson/api_op_GreetingWithErrors_test.go index d9b52bc46a4..844cf2819a5 100644 --- a/internal/protocoltest/awsrestjson/api_op_GreetingWithErrors_test.go +++ b/internal/protocoltest/awsrestjson/api_op_GreetingWithErrors_test.go @@ -8,16 +8,12 @@ import ( "errors" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -108,19 +104,7 @@ func TestClient_GreetingWithErrors_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) @@ -318,19 +302,7 @@ func TestClient_GreetingWithErrors_FooError_awsRestjson1Deserialize(t *testing.T if !errors.As(err, &actualErr) { t.Fatalf("expect *types.FooError result error, got %T", err) } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectError, actualErr, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectError, actualErr); err != nil { t.Errorf("expect c.ExpectError value match:\n%v", err) } }) @@ -447,19 +419,7 @@ func TestClient_GreetingWithErrors_ComplexError_awsRestjson1Deserialize(t *testi if !errors.As(err, &actualErr) { t.Fatalf("expect *types.ComplexError result error, got %T", err) } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectError, actualErr, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectError, actualErr); err != nil { t.Errorf("expect c.ExpectError value match:\n%v", err) } }) @@ -558,19 +518,7 @@ func TestClient_GreetingWithErrors_InvalidGreeting_awsRestjson1Deserialize(t *te if !errors.As(err, &actualErr) { t.Fatalf("expect *types.InvalidGreeting result error, got %T", err) } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectError, actualErr, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectError, actualErr); err != nil { t.Errorf("expect c.ExpectError value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_HttpEnumPayload_test.go b/internal/protocoltest/awsrestjson/api_op_HttpEnumPayload_test.go index 4586ca0f1c8..c70efed2082 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpEnumPayload_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpEnumPayload_test.go @@ -8,17 +8,13 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -182,19 +178,7 @@ func TestClient_HttpEnumPayload_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraitsWithMediaType_test.go b/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraitsWithMediaType_test.go index db17ff35118..a8cc4540a67 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraitsWithMediaType_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraitsWithMediaType_test.go @@ -7,18 +7,14 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -199,19 +195,7 @@ func TestClient_HttpPayloadTraitsWithMediaType_awsRestjson1Deserialize(t *testin if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraits_test.go b/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraits_test.go index a9e594c36ff..0192291fecf 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraits_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraits_test.go @@ -7,18 +7,14 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -226,19 +222,7 @@ func TestClient_HttpPayloadTraits_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_HttpPayloadWithStructure_test.go b/internal/protocoltest/awsrestjson/api_op_HttpPayloadWithStructure_test.go index ba035f1b1c5..16aeb184fb8 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpPayloadWithStructure_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpPayloadWithStructure_test.go @@ -8,18 +8,14 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -208,19 +204,7 @@ func TestClient_HttpPayloadWithStructure_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_HttpPayloadWithUnion_test.go b/internal/protocoltest/awsrestjson/api_op_HttpPayloadWithUnion_test.go index e50d75286b8..d30d71a3c91 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpPayloadWithUnion_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpPayloadWithUnion_test.go @@ -8,17 +8,13 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -218,19 +214,7 @@ func TestClient_HttpPayloadWithUnion_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeadersInResponse_test.go b/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeadersInResponse_test.go index fae7ef6f75f..0ef3e02a1bc 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeadersInResponse_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeadersInResponse_test.go @@ -6,15 +6,11 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -93,19 +89,7 @@ func TestClient_HttpPrefixHeadersInResponse_awsRestjson1Deserialize(t *testing.T if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeaders_test.go b/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeaders_test.go index 0eb251e4d45..c28b977e8a0 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeaders_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeaders_test.go @@ -7,18 +7,14 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -217,19 +213,7 @@ func TestClient_HttpPrefixHeaders_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_HttpResponseCode_test.go b/internal/protocoltest/awsrestjson/api_op_HttpResponseCode_test.go index c47b3d964c2..d206c264d76 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpResponseCode_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpResponseCode_test.go @@ -6,16 +6,12 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -104,19 +100,7 @@ func TestClient_HttpResponseCode_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_HttpStringPayload_test.go b/internal/protocoltest/awsrestjson/api_op_HttpStringPayload_test.go index 7b4b130e3a4..99876292d16 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpStringPayload_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpStringPayload_test.go @@ -7,18 +7,14 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -182,19 +178,7 @@ func TestClient_HttpStringPayload_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_IgnoreQueryParamsInResponse_test.go b/internal/protocoltest/awsrestjson/api_op_IgnoreQueryParamsInResponse_test.go index e64101ffd6d..9b7555032fc 100644 --- a/internal/protocoltest/awsrestjson/api_op_IgnoreQueryParamsInResponse_test.go +++ b/internal/protocoltest/awsrestjson/api_op_IgnoreQueryParamsInResponse_test.go @@ -6,15 +6,11 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -99,19 +95,7 @@ func TestClient_IgnoreQueryParamsInResponse_awsRestjson1Deserialize(t *testing.T if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_InputAndOutputWithHeaders_test.go b/internal/protocoltest/awsrestjson/api_op_InputAndOutputWithHeaders_test.go index 2488158f80f..b615748bfca 100644 --- a/internal/protocoltest/awsrestjson/api_op_InputAndOutputWithHeaders_test.go +++ b/internal/protocoltest/awsrestjson/api_op_InputAndOutputWithHeaders_test.go @@ -8,7 +8,6 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" @@ -16,8 +15,6 @@ import ( smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" "math" @@ -539,19 +536,7 @@ func TestClient_InputAndOutputWithHeaders_awsRestjson1Deserialize(t *testing.T) if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_JsonBlobs_test.go b/internal/protocoltest/awsrestjson/api_op_JsonBlobs_test.go index c9c6d5a8b9a..216d4c815b7 100644 --- a/internal/protocoltest/awsrestjson/api_op_JsonBlobs_test.go +++ b/internal/protocoltest/awsrestjson/api_op_JsonBlobs_test.go @@ -7,17 +7,13 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -195,19 +191,7 @@ func TestClient_JsonBlobs_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_JsonEnums_test.go b/internal/protocoltest/awsrestjson/api_op_JsonEnums_test.go index a91ef084f01..7f1fd69f79e 100644 --- a/internal/protocoltest/awsrestjson/api_op_JsonEnums_test.go +++ b/internal/protocoltest/awsrestjson/api_op_JsonEnums_test.go @@ -8,17 +8,13 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -252,19 +248,7 @@ func TestClient_JsonEnums_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_JsonIntEnums_test.go b/internal/protocoltest/awsrestjson/api_op_JsonIntEnums_test.go index c7334bae95e..47af0aa9f94 100644 --- a/internal/protocoltest/awsrestjson/api_op_JsonIntEnums_test.go +++ b/internal/protocoltest/awsrestjson/api_op_JsonIntEnums_test.go @@ -8,17 +8,13 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -256,19 +252,7 @@ func TestClient_JsonIntEnums_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_JsonLists_test.go b/internal/protocoltest/awsrestjson/api_op_JsonLists_test.go index 977af4007d4..80e349191df 100644 --- a/internal/protocoltest/awsrestjson/api_op_JsonLists_test.go +++ b/internal/protocoltest/awsrestjson/api_op_JsonLists_test.go @@ -8,7 +8,6 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" @@ -16,11 +15,8 @@ import ( smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -463,19 +459,7 @@ func TestClient_JsonLists_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_JsonMaps_test.go b/internal/protocoltest/awsrestjson/api_op_JsonMaps_test.go index 11d5eb01a97..78228a2ea5e 100644 --- a/internal/protocoltest/awsrestjson/api_op_JsonMaps_test.go +++ b/internal/protocoltest/awsrestjson/api_op_JsonMaps_test.go @@ -8,18 +8,14 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -592,19 +588,7 @@ func TestClient_JsonMaps_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_JsonTimestamps_test.go b/internal/protocoltest/awsrestjson/api_op_JsonTimestamps_test.go index dc9cdcddf20..6c4fff68d5c 100644 --- a/internal/protocoltest/awsrestjson/api_op_JsonTimestamps_test.go +++ b/internal/protocoltest/awsrestjson/api_op_JsonTimestamps_test.go @@ -7,7 +7,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" @@ -15,11 +14,8 @@ import ( smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -391,19 +387,7 @@ func TestClient_JsonTimestamps_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_JsonUnions_test.go b/internal/protocoltest/awsrestjson/api_op_JsonUnions_test.go index 888e9357cb3..b6f3bf309a2 100644 --- a/internal/protocoltest/awsrestjson/api_op_JsonUnions_test.go +++ b/internal/protocoltest/awsrestjson/api_op_JsonUnions_test.go @@ -8,7 +8,6 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" @@ -16,11 +15,8 @@ import ( smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -565,19 +561,7 @@ func TestClient_JsonUnions_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_MediaTypeHeader_test.go b/internal/protocoltest/awsrestjson/api_op_MediaTypeHeader_test.go index 2a66388c25c..ade0dc989e7 100644 --- a/internal/protocoltest/awsrestjson/api_op_MediaTypeHeader_test.go +++ b/internal/protocoltest/awsrestjson/api_op_MediaTypeHeader_test.go @@ -7,18 +7,14 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -189,19 +185,7 @@ func TestClient_MediaTypeHeader_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_NoInputAndNoOutput_test.go b/internal/protocoltest/awsrestjson/api_op_NoInputAndNoOutput_test.go index 269b233516f..1593b99f9b9 100644 --- a/internal/protocoltest/awsrestjson/api_op_NoInputAndNoOutput_test.go +++ b/internal/protocoltest/awsrestjson/api_op_NoInputAndNoOutput_test.go @@ -7,17 +7,13 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -181,19 +177,7 @@ func TestClient_NoInputAndNoOutput_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_NoInputAndOutput_test.go b/internal/protocoltest/awsrestjson/api_op_NoInputAndOutput_test.go index c0a2b77b326..c4c7b451829 100644 --- a/internal/protocoltest/awsrestjson/api_op_NoInputAndOutput_test.go +++ b/internal/protocoltest/awsrestjson/api_op_NoInputAndOutput_test.go @@ -7,17 +7,13 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -192,19 +188,7 @@ func TestClient_NoInputAndOutput_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_PostPlayerAction_test.go b/internal/protocoltest/awsrestjson/api_op_PostPlayerAction_test.go index c9c88c46280..e6cd191ccfc 100644 --- a/internal/protocoltest/awsrestjson/api_op_PostPlayerAction_test.go +++ b/internal/protocoltest/awsrestjson/api_op_PostPlayerAction_test.go @@ -8,17 +8,13 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -200,19 +196,7 @@ func TestClient_PostPlayerAction_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_PostUnionWithJsonName_test.go b/internal/protocoltest/awsrestjson/api_op_PostUnionWithJsonName_test.go index 65fd46325e1..cf27a164af0 100644 --- a/internal/protocoltest/awsrestjson/api_op_PostUnionWithJsonName_test.go +++ b/internal/protocoltest/awsrestjson/api_op_PostUnionWithJsonName_test.go @@ -8,17 +8,13 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -272,19 +268,7 @@ func TestClient_PostUnionWithJsonName_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_RecursiveShapes_test.go b/internal/protocoltest/awsrestjson/api_op_RecursiveShapes_test.go index fa2da1ca271..aee81eb4048 100644 --- a/internal/protocoltest/awsrestjson/api_op_RecursiveShapes_test.go +++ b/internal/protocoltest/awsrestjson/api_op_RecursiveShapes_test.go @@ -8,18 +8,14 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -241,19 +237,7 @@ func TestClient_RecursiveShapes_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_SimpleScalarProperties_test.go b/internal/protocoltest/awsrestjson/api_op_SimpleScalarProperties_test.go index fe84a4efe4e..8cff137bba6 100644 --- a/internal/protocoltest/awsrestjson/api_op_SimpleScalarProperties_test.go +++ b/internal/protocoltest/awsrestjson/api_op_SimpleScalarProperties_test.go @@ -7,15 +7,12 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" "math" @@ -368,19 +365,7 @@ func TestClient_SimpleScalarProperties_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_StreamingTraitsWithMediaType_test.go b/internal/protocoltest/awsrestjson/api_op_StreamingTraitsWithMediaType_test.go index e708253e03d..88403c85ce9 100644 --- a/internal/protocoltest/awsrestjson/api_op_StreamingTraitsWithMediaType_test.go +++ b/internal/protocoltest/awsrestjson/api_op_StreamingTraitsWithMediaType_test.go @@ -7,7 +7,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" smithyio "github.com/aws/smithy-go/io" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" @@ -15,11 +14,8 @@ import ( smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -197,19 +193,7 @@ func TestClient_StreamingTraitsWithMediaType_awsRestjson1Deserialize(t *testing. if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_StreamingTraits_test.go b/internal/protocoltest/awsrestjson/api_op_StreamingTraits_test.go index c8fe0c5a9d0..31629b197b5 100644 --- a/internal/protocoltest/awsrestjson/api_op_StreamingTraits_test.go +++ b/internal/protocoltest/awsrestjson/api_op_StreamingTraits_test.go @@ -7,7 +7,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" smithyio "github.com/aws/smithy-go/io" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" @@ -15,11 +14,8 @@ import ( smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -225,19 +221,7 @@ func TestClient_StreamingTraits_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_TimestampFormatHeaders_test.go b/internal/protocoltest/awsrestjson/api_op_TimestampFormatHeaders_test.go index 017202586da..1a48609e711 100644 --- a/internal/protocoltest/awsrestjson/api_op_TimestampFormatHeaders_test.go +++ b/internal/protocoltest/awsrestjson/api_op_TimestampFormatHeaders_test.go @@ -7,7 +7,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" @@ -15,11 +14,8 @@ import ( smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -214,19 +210,7 @@ func TestClient_TimestampFormatHeaders_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/api_op_UnitInputAndOutput_test.go b/internal/protocoltest/awsrestjson/api_op_UnitInputAndOutput_test.go index 53706276020..eac976dfcb4 100644 --- a/internal/protocoltest/awsrestjson/api_op_UnitInputAndOutput_test.go +++ b/internal/protocoltest/awsrestjson/api_op_UnitInputAndOutput_test.go @@ -7,17 +7,13 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -181,19 +177,7 @@ func TestClient_UnitInputAndOutput_awsRestjson1Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/awsrestjson/generated.json b/internal/protocoltest/awsrestjson/generated.json index 51104bda14d..ef14684a1c4 100644 --- a/internal/protocoltest/awsrestjson/generated.json +++ b/internal/protocoltest/awsrestjson/generated.json @@ -3,8 +3,7 @@ "github.com/aws/aws-sdk-go-v2": "v1.4.0", "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", - "github.com/aws/smithy-go": "v1.4.0", - "github.com/google/go-cmp": "v0.5.4" + "github.com/aws/smithy-go": "v1.4.0" }, "files": [ "api_client.go", diff --git a/internal/protocoltest/awsrestjson/go.mod b/internal/protocoltest/awsrestjson/go.mod index 80e65bf7bb2..ce6a1009484 100644 --- a/internal/protocoltest/awsrestjson/go.mod +++ b/internal/protocoltest/awsrestjson/go.mod @@ -7,9 +7,10 @@ require ( github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0 github.com/aws/smithy-go v1.20.0 - github.com/google/go-cmp v0.5.8 ) +require github.com/google/go-cmp v0.5.8 // indirect + replace github.com/aws/aws-sdk-go-v2 => ../../../ replace github.com/aws/aws-sdk-go-v2/internal/configsources => ../../../internal/configsources/ diff --git a/internal/protocoltest/ec2query/api_op_DatetimeOffsets_test.go b/internal/protocoltest/ec2query/api_op_DatetimeOffsets_test.go index fe755613cb5..e8aaef4302c 100644 --- a/internal/protocoltest/ec2query/api_op_DatetimeOffsets_test.go +++ b/internal/protocoltest/ec2query/api_op_DatetimeOffsets_test.go @@ -6,17 +6,13 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -113,19 +109,7 @@ func TestClient_DatetimeOffsets_awsEc2queryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/ec2query/api_op_EmptyInputAndEmptyOutput_test.go b/internal/protocoltest/ec2query/api_op_EmptyInputAndEmptyOutput_test.go index d6fbc23bdba..af1008d22e8 100644 --- a/internal/protocoltest/ec2query/api_op_EmptyInputAndEmptyOutput_test.go +++ b/internal/protocoltest/ec2query/api_op_EmptyInputAndEmptyOutput_test.go @@ -7,17 +7,13 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -190,19 +186,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsEc2queryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/ec2query/api_op_FractionalSeconds_test.go b/internal/protocoltest/ec2query/api_op_FractionalSeconds_test.go index a1176fcba4d..dcd6554d742 100644 --- a/internal/protocoltest/ec2query/api_op_FractionalSeconds_test.go +++ b/internal/protocoltest/ec2query/api_op_FractionalSeconds_test.go @@ -6,17 +6,13 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -98,19 +94,7 @@ func TestClient_FractionalSeconds_awsEc2queryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/ec2query/api_op_GreetingWithErrors_test.go b/internal/protocoltest/ec2query/api_op_GreetingWithErrors_test.go index b897291cbe7..2e3200cbe63 100644 --- a/internal/protocoltest/ec2query/api_op_GreetingWithErrors_test.go +++ b/internal/protocoltest/ec2query/api_op_GreetingWithErrors_test.go @@ -8,16 +8,12 @@ import ( "errors" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/ec2query/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -99,19 +95,7 @@ func TestClient_GreetingWithErrors_awsEc2queryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) @@ -216,19 +200,7 @@ func TestClient_GreetingWithErrors_InvalidGreeting_awsEc2queryDeserialize(t *tes if !errors.As(err, &actualErr) { t.Fatalf("expect *types.InvalidGreeting result error, got %T", err) } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectError, actualErr, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectError, actualErr); err != nil { t.Errorf("expect c.ExpectError value match:\n%v", err) } }) @@ -339,19 +311,7 @@ func TestClient_GreetingWithErrors_ComplexError_awsEc2queryDeserialize(t *testin if !errors.As(err, &actualErr) { t.Fatalf("expect *types.ComplexError result error, got %T", err) } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectError, actualErr, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectError, actualErr); err != nil { t.Errorf("expect c.ExpectError value match:\n%v", err) } }) diff --git a/internal/protocoltest/ec2query/api_op_IgnoresWrappingXmlName_test.go b/internal/protocoltest/ec2query/api_op_IgnoresWrappingXmlName_test.go index 25efad1e893..1c317595200 100644 --- a/internal/protocoltest/ec2query/api_op_IgnoresWrappingXmlName_test.go +++ b/internal/protocoltest/ec2query/api_op_IgnoresWrappingXmlName_test.go @@ -6,16 +6,12 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -96,19 +92,7 @@ func TestClient_IgnoresWrappingXmlName_awsEc2queryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/ec2query/api_op_NoInputAndOutput_test.go b/internal/protocoltest/ec2query/api_op_NoInputAndOutput_test.go index 3be778c8eb5..3c89a06e69e 100644 --- a/internal/protocoltest/ec2query/api_op_NoInputAndOutput_test.go +++ b/internal/protocoltest/ec2query/api_op_NoInputAndOutput_test.go @@ -7,17 +7,13 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -190,19 +186,7 @@ func TestClient_NoInputAndOutput_awsEc2queryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/ec2query/api_op_RecursiveXmlShapes_test.go b/internal/protocoltest/ec2query/api_op_RecursiveXmlShapes_test.go index 11243256c89..aae5d79e00a 100644 --- a/internal/protocoltest/ec2query/api_op_RecursiveXmlShapes_test.go +++ b/internal/protocoltest/ec2query/api_op_RecursiveXmlShapes_test.go @@ -7,16 +7,12 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/ec2query/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -119,19 +115,7 @@ func TestClient_RecursiveXmlShapes_awsEc2queryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/ec2query/api_op_SimpleScalarXmlProperties_test.go b/internal/protocoltest/ec2query/api_op_SimpleScalarXmlProperties_test.go index 69db43b6a37..71960f0f00e 100644 --- a/internal/protocoltest/ec2query/api_op_SimpleScalarXmlProperties_test.go +++ b/internal/protocoltest/ec2query/api_op_SimpleScalarXmlProperties_test.go @@ -6,14 +6,11 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" "math" "net/http" @@ -165,19 +162,7 @@ func TestClient_SimpleScalarXmlProperties_awsEc2queryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/ec2query/api_op_XmlBlobs_test.go b/internal/protocoltest/ec2query/api_op_XmlBlobs_test.go index f862b83ed45..5c243da59d6 100644 --- a/internal/protocoltest/ec2query/api_op_XmlBlobs_test.go +++ b/internal/protocoltest/ec2query/api_op_XmlBlobs_test.go @@ -6,15 +6,11 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -95,19 +91,7 @@ func TestClient_XmlBlobs_awsEc2queryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/ec2query/api_op_XmlEmptyBlobs_test.go b/internal/protocoltest/ec2query/api_op_XmlEmptyBlobs_test.go index d1323d377b2..9eeb6f0cc9c 100644 --- a/internal/protocoltest/ec2query/api_op_XmlEmptyBlobs_test.go +++ b/internal/protocoltest/ec2query/api_op_XmlEmptyBlobs_test.go @@ -6,15 +6,11 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -111,19 +107,7 @@ func TestClient_XmlEmptyBlobs_awsEc2queryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/ec2query/api_op_XmlEmptyLists_test.go b/internal/protocoltest/ec2query/api_op_XmlEmptyLists_test.go index c0f5dcecf5c..04ea2f6afc5 100644 --- a/internal/protocoltest/ec2query/api_op_XmlEmptyLists_test.go +++ b/internal/protocoltest/ec2query/api_op_XmlEmptyLists_test.go @@ -6,15 +6,11 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -96,19 +92,7 @@ func TestClient_XmlEmptyLists_awsEc2queryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/ec2query/api_op_XmlEnums_test.go b/internal/protocoltest/ec2query/api_op_XmlEnums_test.go index 99b3600e85b..9543cc19d29 100644 --- a/internal/protocoltest/ec2query/api_op_XmlEnums_test.go +++ b/internal/protocoltest/ec2query/api_op_XmlEnums_test.go @@ -7,15 +7,11 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/ec2query/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -130,19 +126,7 @@ func TestClient_XmlEnums_awsEc2queryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/ec2query/api_op_XmlIntEnums_test.go b/internal/protocoltest/ec2query/api_op_XmlIntEnums_test.go index cc49246138c..cd60621d512 100644 --- a/internal/protocoltest/ec2query/api_op_XmlIntEnums_test.go +++ b/internal/protocoltest/ec2query/api_op_XmlIntEnums_test.go @@ -7,15 +7,11 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/ec2query/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -130,19 +126,7 @@ func TestClient_XmlIntEnums_awsEc2queryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/ec2query/api_op_XmlLists_test.go b/internal/protocoltest/ec2query/api_op_XmlLists_test.go index 297b88fc355..d6751346c10 100644 --- a/internal/protocoltest/ec2query/api_op_XmlLists_test.go +++ b/internal/protocoltest/ec2query/api_op_XmlLists_test.go @@ -7,17 +7,13 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/ec2query/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" "time" @@ -225,19 +221,7 @@ func TestClient_XmlLists_awsEc2queryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/ec2query/api_op_XmlNamespaces_test.go b/internal/protocoltest/ec2query/api_op_XmlNamespaces_test.go index e63956b7728..38840609eab 100644 --- a/internal/protocoltest/ec2query/api_op_XmlNamespaces_test.go +++ b/internal/protocoltest/ec2query/api_op_XmlNamespaces_test.go @@ -7,16 +7,12 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/ec2query/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -109,19 +105,7 @@ func TestClient_XmlNamespaces_awsEc2queryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/ec2query/api_op_XmlTimestamps_test.go b/internal/protocoltest/ec2query/api_op_XmlTimestamps_test.go index d7fccfdf202..07b99d328ab 100644 --- a/internal/protocoltest/ec2query/api_op_XmlTimestamps_test.go +++ b/internal/protocoltest/ec2query/api_op_XmlTimestamps_test.go @@ -6,17 +6,13 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -194,19 +190,7 @@ func TestClient_XmlTimestamps_awsEc2queryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/ec2query/generated.json b/internal/protocoltest/ec2query/generated.json index e4a3841e3f4..bf0e4359228 100644 --- a/internal/protocoltest/ec2query/generated.json +++ b/internal/protocoltest/ec2query/generated.json @@ -3,8 +3,7 @@ "github.com/aws/aws-sdk-go-v2": "v1.4.0", "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", - "github.com/aws/smithy-go": "v1.4.0", - "github.com/google/go-cmp": "v0.5.4" + "github.com/aws/smithy-go": "v1.4.0" }, "files": [ "api_client.go", diff --git a/internal/protocoltest/ec2query/go.mod b/internal/protocoltest/ec2query/go.mod index 90eb2f88b77..3af0274e289 100644 --- a/internal/protocoltest/ec2query/go.mod +++ b/internal/protocoltest/ec2query/go.mod @@ -7,9 +7,10 @@ require ( github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0 github.com/aws/smithy-go v1.20.0 - github.com/google/go-cmp v0.5.8 ) +require github.com/google/go-cmp v0.5.8 // indirect + replace github.com/aws/aws-sdk-go-v2 => ../../../ replace github.com/aws/aws-sdk-go-v2/internal/configsources => ../../../internal/configsources/ diff --git a/internal/protocoltest/jsonrpc/api_op_DatetimeOffsets_test.go b/internal/protocoltest/jsonrpc/api_op_DatetimeOffsets_test.go index 35ce3bef356..6d00538f4d4 100644 --- a/internal/protocoltest/jsonrpc/api_op_DatetimeOffsets_test.go +++ b/internal/protocoltest/jsonrpc/api_op_DatetimeOffsets_test.go @@ -6,16 +6,12 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -109,19 +105,7 @@ func TestClient_DatetimeOffsets_awsAwsjson11Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/jsonrpc/api_op_EmptyOperation_test.go b/internal/protocoltest/jsonrpc/api_op_EmptyOperation_test.go index 022b2cc92f7..40b79c5f715 100644 --- a/internal/protocoltest/jsonrpc/api_op_EmptyOperation_test.go +++ b/internal/protocoltest/jsonrpc/api_op_EmptyOperation_test.go @@ -7,16 +7,12 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -238,19 +234,7 @@ func TestClient_EmptyOperation_awsAwsjson11Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/jsonrpc/api_op_FractionalSeconds_test.go b/internal/protocoltest/jsonrpc/api_op_FractionalSeconds_test.go index 44e2ceb2cf8..7685fe591ce 100644 --- a/internal/protocoltest/jsonrpc/api_op_FractionalSeconds_test.go +++ b/internal/protocoltest/jsonrpc/api_op_FractionalSeconds_test.go @@ -6,16 +6,12 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -95,19 +91,7 @@ func TestClient_FractionalSeconds_awsAwsjson11Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/jsonrpc/api_op_GreetingWithErrors_test.go b/internal/protocoltest/jsonrpc/api_op_GreetingWithErrors_test.go index dbed9a61231..3f1f58852c1 100644 --- a/internal/protocoltest/jsonrpc/api_op_GreetingWithErrors_test.go +++ b/internal/protocoltest/jsonrpc/api_op_GreetingWithErrors_test.go @@ -8,15 +8,11 @@ import ( "errors" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/jsonrpc/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -112,19 +108,7 @@ func TestClient_GreetingWithErrors_InvalidGreeting_awsAwsjson11Deserialize(t *te if !errors.As(err, &actualErr) { t.Fatalf("expect *types.InvalidGreeting result error, got %T", err) } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectError, actualErr, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectError, actualErr); err != nil { t.Errorf("expect c.ExpectError value match:\n%v", err) } }) @@ -239,19 +223,7 @@ func TestClient_GreetingWithErrors_ComplexError_awsAwsjson11Deserialize(t *testi if !errors.As(err, &actualErr) { t.Fatalf("expect *types.ComplexError result error, got %T", err) } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectError, actualErr, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectError, actualErr); err != nil { t.Errorf("expect c.ExpectError value match:\n%v", err) } }) @@ -448,19 +420,7 @@ func TestClient_GreetingWithErrors_FooError_awsAwsjson11Deserialize(t *testing.T if !errors.As(err, &actualErr) { t.Fatalf("expect *types.FooError result error, got %T", err) } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectError, actualErr, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectError, actualErr); err != nil { t.Errorf("expect c.ExpectError value match:\n%v", err) } }) diff --git a/internal/protocoltest/jsonrpc/api_op_JsonEnums_test.go b/internal/protocoltest/jsonrpc/api_op_JsonEnums_test.go index a9aa1c32259..9cdd7be0af1 100644 --- a/internal/protocoltest/jsonrpc/api_op_JsonEnums_test.go +++ b/internal/protocoltest/jsonrpc/api_op_JsonEnums_test.go @@ -8,16 +8,12 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/jsonrpc/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -250,19 +246,7 @@ func TestClient_JsonEnums_awsAwsjson11Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/jsonrpc/api_op_JsonUnions_test.go b/internal/protocoltest/jsonrpc/api_op_JsonUnions_test.go index 19206310da1..24a6db20753 100644 --- a/internal/protocoltest/jsonrpc/api_op_JsonUnions_test.go +++ b/internal/protocoltest/jsonrpc/api_op_JsonUnions_test.go @@ -8,18 +8,14 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/jsonrpc/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -547,19 +543,7 @@ func TestClient_JsonUnions_awsAwsjson11Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/jsonrpc/api_op_KitchenSinkOperation_test.go b/internal/protocoltest/jsonrpc/api_op_KitchenSinkOperation_test.go index 139e4dce7b0..88a0d0fed26 100644 --- a/internal/protocoltest/jsonrpc/api_op_KitchenSinkOperation_test.go +++ b/internal/protocoltest/jsonrpc/api_op_KitchenSinkOperation_test.go @@ -8,18 +8,14 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/jsonrpc/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -1166,19 +1162,7 @@ func TestClient_KitchenSinkOperation_awsAwsjson11Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/jsonrpc/api_op_NullOperation_test.go b/internal/protocoltest/jsonrpc/api_op_NullOperation_test.go index 6b28ae2d94a..4957b234fb3 100644 --- a/internal/protocoltest/jsonrpc/api_op_NullOperation_test.go +++ b/internal/protocoltest/jsonrpc/api_op_NullOperation_test.go @@ -7,16 +7,12 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -271,19 +267,7 @@ func TestClient_NullOperation_awsAwsjson11Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/jsonrpc/api_op_PutAndGetInlineDocuments_test.go b/internal/protocoltest/jsonrpc/api_op_PutAndGetInlineDocuments_test.go index d6893a6ce1e..d6aa9ec0b32 100644 --- a/internal/protocoltest/jsonrpc/api_op_PutAndGetInlineDocuments_test.go +++ b/internal/protocoltest/jsonrpc/api_op_PutAndGetInlineDocuments_test.go @@ -8,16 +8,12 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/jsonrpc/document" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -201,19 +197,7 @@ func TestClient_PutAndGetInlineDocuments_awsAwsjson11Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/jsonrpc/api_op_SimpleScalarProperties_test.go b/internal/protocoltest/jsonrpc/api_op_SimpleScalarProperties_test.go index 5075f574d8f..398df2c1386 100644 --- a/internal/protocoltest/jsonrpc/api_op_SimpleScalarProperties_test.go +++ b/internal/protocoltest/jsonrpc/api_op_SimpleScalarProperties_test.go @@ -7,14 +7,11 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" "math" @@ -272,19 +269,7 @@ func TestClient_SimpleScalarProperties_awsAwsjson11Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/jsonrpc/generated.json b/internal/protocoltest/jsonrpc/generated.json index 0cedfb2e7c5..bc4edcb063a 100644 --- a/internal/protocoltest/jsonrpc/generated.json +++ b/internal/protocoltest/jsonrpc/generated.json @@ -3,8 +3,7 @@ "github.com/aws/aws-sdk-go-v2": "v1.4.0", "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", - "github.com/aws/smithy-go": "v1.4.0", - "github.com/google/go-cmp": "v0.5.4" + "github.com/aws/smithy-go": "v1.4.0" }, "files": [ "api_client.go", diff --git a/internal/protocoltest/jsonrpc/go.mod b/internal/protocoltest/jsonrpc/go.mod index 7a19bfa3fd7..0827a94cea8 100644 --- a/internal/protocoltest/jsonrpc/go.mod +++ b/internal/protocoltest/jsonrpc/go.mod @@ -7,9 +7,10 @@ require ( github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0 github.com/aws/smithy-go v1.20.0 - github.com/google/go-cmp v0.5.8 ) +require github.com/google/go-cmp v0.5.8 // indirect + replace github.com/aws/aws-sdk-go-v2 => ../../../ replace github.com/aws/aws-sdk-go-v2/internal/configsources => ../../../internal/configsources/ diff --git a/internal/protocoltest/jsonrpc10/api_op_EmptyInputAndEmptyOutput_test.go b/internal/protocoltest/jsonrpc10/api_op_EmptyInputAndEmptyOutput_test.go index 764894fabd9..ecd0f57253a 100644 --- a/internal/protocoltest/jsonrpc10/api_op_EmptyInputAndEmptyOutput_test.go +++ b/internal/protocoltest/jsonrpc10/api_op_EmptyInputAndEmptyOutput_test.go @@ -7,16 +7,12 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -185,19 +181,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsAwsjson10Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/jsonrpc10/api_op_GreetingWithErrors_test.go b/internal/protocoltest/jsonrpc10/api_op_GreetingWithErrors_test.go index 69eb0a11e5e..16e74fdb965 100644 --- a/internal/protocoltest/jsonrpc10/api_op_GreetingWithErrors_test.go +++ b/internal/protocoltest/jsonrpc10/api_op_GreetingWithErrors_test.go @@ -8,15 +8,11 @@ import ( "errors" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/jsonrpc10/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -112,19 +108,7 @@ func TestClient_GreetingWithErrors_InvalidGreeting_awsAwsjson10Deserialize(t *te if !errors.As(err, &actualErr) { t.Fatalf("expect *types.InvalidGreeting result error, got %T", err) } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectError, actualErr, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectError, actualErr); err != nil { t.Errorf("expect c.ExpectError value match:\n%v", err) } }) @@ -321,19 +305,7 @@ func TestClient_GreetingWithErrors_FooError_awsAwsjson10Deserialize(t *testing.T if !errors.As(err, &actualErr) { t.Fatalf("expect *types.FooError result error, got %T", err) } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectError, actualErr, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectError, actualErr); err != nil { t.Errorf("expect c.ExpectError value match:\n%v", err) } }) @@ -449,19 +421,7 @@ func TestClient_GreetingWithErrors_ComplexError_awsAwsjson10Deserialize(t *testi if !errors.As(err, &actualErr) { t.Fatalf("expect *types.ComplexError result error, got %T", err) } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectError, actualErr, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectError, actualErr); err != nil { t.Errorf("expect c.ExpectError value match:\n%v", err) } }) diff --git a/internal/protocoltest/jsonrpc10/api_op_JsonUnions_test.go b/internal/protocoltest/jsonrpc10/api_op_JsonUnions_test.go index 844b2408c54..cc2609a8fe9 100644 --- a/internal/protocoltest/jsonrpc10/api_op_JsonUnions_test.go +++ b/internal/protocoltest/jsonrpc10/api_op_JsonUnions_test.go @@ -8,18 +8,14 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/jsonrpc10/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -584,19 +580,7 @@ func TestClient_JsonUnions_awsAwsjson10Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/jsonrpc10/api_op_NoInputAndNoOutput_test.go b/internal/protocoltest/jsonrpc10/api_op_NoInputAndNoOutput_test.go index 161a3cfdea4..91d39837bb6 100644 --- a/internal/protocoltest/jsonrpc10/api_op_NoInputAndNoOutput_test.go +++ b/internal/protocoltest/jsonrpc10/api_op_NoInputAndNoOutput_test.go @@ -7,16 +7,12 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -216,19 +212,7 @@ func TestClient_NoInputAndNoOutput_awsAwsjson10Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/jsonrpc10/api_op_NoInputAndOutput_test.go b/internal/protocoltest/jsonrpc10/api_op_NoInputAndOutput_test.go index 2e6f69642b1..c75c827a9c4 100644 --- a/internal/protocoltest/jsonrpc10/api_op_NoInputAndOutput_test.go +++ b/internal/protocoltest/jsonrpc10/api_op_NoInputAndOutput_test.go @@ -7,16 +7,12 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -185,19 +181,7 @@ func TestClient_NoInputAndOutput_awsAwsjson10Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/jsonrpc10/api_op_OperationWithDefaults_test.go b/internal/protocoltest/jsonrpc10/api_op_OperationWithDefaults_test.go index c71fee421af..ee92c322de9 100644 --- a/internal/protocoltest/jsonrpc10/api_op_OperationWithDefaults_test.go +++ b/internal/protocoltest/jsonrpc10/api_op_OperationWithDefaults_test.go @@ -9,18 +9,14 @@ import ( protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/jsonrpc10/document" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/jsonrpc10/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -389,19 +385,7 @@ func TestClient_OperationWithDefaults_awsAwsjson10Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/jsonrpc10/api_op_OperationWithNestedStructure_test.go b/internal/protocoltest/jsonrpc10/api_op_OperationWithNestedStructure_test.go index 3497e8ac1e1..4134e9c5fcb 100644 --- a/internal/protocoltest/jsonrpc10/api_op_OperationWithNestedStructure_test.go +++ b/internal/protocoltest/jsonrpc10/api_op_OperationWithNestedStructure_test.go @@ -8,17 +8,13 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/jsonrpc10/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -342,19 +338,7 @@ func TestClient_OperationWithNestedStructure_awsAwsjson10Deserialize(t *testing. if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/jsonrpc10/api_op_OperationWithRequiredMembers_test.go b/internal/protocoltest/jsonrpc10/api_op_OperationWithRequiredMembers_test.go index e201e89c72a..74b2e943a8f 100644 --- a/internal/protocoltest/jsonrpc10/api_op_OperationWithRequiredMembers_test.go +++ b/internal/protocoltest/jsonrpc10/api_op_OperationWithRequiredMembers_test.go @@ -6,16 +6,12 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -106,19 +102,7 @@ func TestClient_OperationWithRequiredMembers_awsAwsjson10Deserialize(t *testing. if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/jsonrpc10/api_op_SimpleScalarProperties_test.go b/internal/protocoltest/jsonrpc10/api_op_SimpleScalarProperties_test.go index 53b24c90b92..008d0e4776d 100644 --- a/internal/protocoltest/jsonrpc10/api_op_SimpleScalarProperties_test.go +++ b/internal/protocoltest/jsonrpc10/api_op_SimpleScalarProperties_test.go @@ -7,14 +7,11 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" "math" @@ -272,19 +269,7 @@ func TestClient_SimpleScalarProperties_awsAwsjson10Deserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/jsonrpc10/generated.json b/internal/protocoltest/jsonrpc10/generated.json index 3fb24ea7e73..028265b0639 100644 --- a/internal/protocoltest/jsonrpc10/generated.json +++ b/internal/protocoltest/jsonrpc10/generated.json @@ -3,8 +3,7 @@ "github.com/aws/aws-sdk-go-v2": "v1.4.0", "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", - "github.com/aws/smithy-go": "v1.4.0", - "github.com/google/go-cmp": "v0.5.4" + "github.com/aws/smithy-go": "v1.4.0" }, "files": [ "api_client.go", diff --git a/internal/protocoltest/jsonrpc10/go.mod b/internal/protocoltest/jsonrpc10/go.mod index 5b27740ae13..184194c1fab 100644 --- a/internal/protocoltest/jsonrpc10/go.mod +++ b/internal/protocoltest/jsonrpc10/go.mod @@ -7,9 +7,10 @@ require ( github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0 github.com/aws/smithy-go v1.20.0 - github.com/google/go-cmp v0.5.8 ) +require github.com/google/go-cmp v0.5.8 // indirect + replace github.com/aws/aws-sdk-go-v2 => ../../../ replace github.com/aws/aws-sdk-go-v2/internal/configsources => ../../../internal/configsources/ diff --git a/internal/protocoltest/query/api_op_DatetimeOffsets_test.go b/internal/protocoltest/query/api_op_DatetimeOffsets_test.go index d90ba9bd8b1..8d6ac38af93 100644 --- a/internal/protocoltest/query/api_op_DatetimeOffsets_test.go +++ b/internal/protocoltest/query/api_op_DatetimeOffsets_test.go @@ -6,17 +6,13 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -115,19 +111,7 @@ func TestClient_DatetimeOffsets_awsAwsqueryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/api_op_EmptyInputAndEmptyOutput_test.go b/internal/protocoltest/query/api_op_EmptyInputAndEmptyOutput_test.go index 2ebf71dd559..ef2b694b98a 100644 --- a/internal/protocoltest/query/api_op_EmptyInputAndEmptyOutput_test.go +++ b/internal/protocoltest/query/api_op_EmptyInputAndEmptyOutput_test.go @@ -7,17 +7,13 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -182,19 +178,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsAwsqueryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlName_test.go b/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlName_test.go index feee2911722..c1e17a6cac0 100644 --- a/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlName_test.go +++ b/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlName_test.go @@ -6,15 +6,11 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -105,19 +101,7 @@ func TestClient_FlattenedXmlMapWithXmlName_awsAwsqueryDeserialize(t *testing.T) if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlNamespace_test.go b/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlNamespace_test.go index f7f47da033d..494132fbbe0 100644 --- a/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlNamespace_test.go +++ b/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlNamespace_test.go @@ -6,15 +6,11 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -106,19 +102,7 @@ func TestClient_FlattenedXmlMapWithXmlNamespace_awsAwsqueryDeserialize(t *testin if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/api_op_FlattenedXmlMap_test.go b/internal/protocoltest/query/api_op_FlattenedXmlMap_test.go index 48312436e83..5b8028839a8 100644 --- a/internal/protocoltest/query/api_op_FlattenedXmlMap_test.go +++ b/internal/protocoltest/query/api_op_FlattenedXmlMap_test.go @@ -7,15 +7,11 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/query/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -106,19 +102,7 @@ func TestClient_FlattenedXmlMap_awsAwsqueryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/api_op_FractionalSeconds_test.go b/internal/protocoltest/query/api_op_FractionalSeconds_test.go index d2330eae5c9..1f062119284 100644 --- a/internal/protocoltest/query/api_op_FractionalSeconds_test.go +++ b/internal/protocoltest/query/api_op_FractionalSeconds_test.go @@ -6,17 +6,13 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -99,19 +95,7 @@ func TestClient_FractionalSeconds_awsAwsqueryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/api_op_GreetingWithErrors_test.go b/internal/protocoltest/query/api_op_GreetingWithErrors_test.go index 1569f9ae82b..a5d5d8bffb9 100644 --- a/internal/protocoltest/query/api_op_GreetingWithErrors_test.go +++ b/internal/protocoltest/query/api_op_GreetingWithErrors_test.go @@ -8,16 +8,12 @@ import ( "errors" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/query/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -100,19 +96,7 @@ func TestClient_GreetingWithErrors_awsAwsqueryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) @@ -216,19 +200,7 @@ func TestClient_GreetingWithErrors_InvalidGreeting_awsAwsqueryDeserialize(t *tes if !errors.As(err, &actualErr) { t.Fatalf("expect *types.InvalidGreeting result error, got %T", err) } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectError, actualErr, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectError, actualErr); err != nil { t.Errorf("expect c.ExpectError value match:\n%v", err) } }) @@ -332,19 +304,7 @@ func TestClient_GreetingWithErrors_CustomCodeError_awsAwsqueryDeserialize(t *tes if !errors.As(err, &actualErr) { t.Fatalf("expect *types.CustomCodeError result error, got %T", err) } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectError, actualErr, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectError, actualErr); err != nil { t.Errorf("expect c.ExpectError value match:\n%v", err) } }) @@ -453,19 +413,7 @@ func TestClient_GreetingWithErrors_ComplexError_awsAwsqueryDeserialize(t *testin if !errors.As(err, &actualErr) { t.Fatalf("expect *types.ComplexError result error, got %T", err) } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectError, actualErr, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectError, actualErr); err != nil { t.Errorf("expect c.ExpectError value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/api_op_IgnoresWrappingXmlName_test.go b/internal/protocoltest/query/api_op_IgnoresWrappingXmlName_test.go index 30da68666ed..476bbc2afe4 100644 --- a/internal/protocoltest/query/api_op_IgnoresWrappingXmlName_test.go +++ b/internal/protocoltest/query/api_op_IgnoresWrappingXmlName_test.go @@ -6,16 +6,12 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -97,19 +93,7 @@ func TestClient_IgnoresWrappingXmlName_awsAwsqueryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/api_op_NoInputAndNoOutput_test.go b/internal/protocoltest/query/api_op_NoInputAndNoOutput_test.go index fa72d620e7c..250694f92ee 100644 --- a/internal/protocoltest/query/api_op_NoInputAndNoOutput_test.go +++ b/internal/protocoltest/query/api_op_NoInputAndNoOutput_test.go @@ -7,17 +7,13 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -182,19 +178,7 @@ func TestClient_NoInputAndNoOutput_awsAwsqueryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/api_op_NoInputAndOutput_test.go b/internal/protocoltest/query/api_op_NoInputAndOutput_test.go index 6934eeae98a..da34c33b413 100644 --- a/internal/protocoltest/query/api_op_NoInputAndOutput_test.go +++ b/internal/protocoltest/query/api_op_NoInputAndOutput_test.go @@ -7,17 +7,13 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -182,19 +178,7 @@ func TestClient_NoInputAndOutput_awsAwsqueryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/api_op_RecursiveXmlShapes_test.go b/internal/protocoltest/query/api_op_RecursiveXmlShapes_test.go index 743ef2cdfdc..b4000a60e6d 100644 --- a/internal/protocoltest/query/api_op_RecursiveXmlShapes_test.go +++ b/internal/protocoltest/query/api_op_RecursiveXmlShapes_test.go @@ -7,16 +7,12 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/query/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -120,19 +116,7 @@ func TestClient_RecursiveXmlShapes_awsAwsqueryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/api_op_SimpleScalarXmlProperties_test.go b/internal/protocoltest/query/api_op_SimpleScalarXmlProperties_test.go index 5481404c15e..7de0cffa838 100644 --- a/internal/protocoltest/query/api_op_SimpleScalarXmlProperties_test.go +++ b/internal/protocoltest/query/api_op_SimpleScalarXmlProperties_test.go @@ -6,14 +6,11 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" "math" "net/http" @@ -172,19 +169,7 @@ func TestClient_SimpleScalarXmlProperties_awsAwsqueryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/api_op_XmlBlobs_test.go b/internal/protocoltest/query/api_op_XmlBlobs_test.go index 631b3e9a0a4..05335711136 100644 --- a/internal/protocoltest/query/api_op_XmlBlobs_test.go +++ b/internal/protocoltest/query/api_op_XmlBlobs_test.go @@ -6,15 +6,11 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -96,19 +92,7 @@ func TestClient_XmlBlobs_awsAwsqueryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/api_op_XmlEmptyBlobs_test.go b/internal/protocoltest/query/api_op_XmlEmptyBlobs_test.go index 7bf096a00a7..8907c814b24 100644 --- a/internal/protocoltest/query/api_op_XmlEmptyBlobs_test.go +++ b/internal/protocoltest/query/api_op_XmlEmptyBlobs_test.go @@ -6,15 +6,11 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -113,19 +109,7 @@ func TestClient_XmlEmptyBlobs_awsAwsqueryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/api_op_XmlEmptyLists_test.go b/internal/protocoltest/query/api_op_XmlEmptyLists_test.go index 6bd7c8ce3b5..bdb6bde2734 100644 --- a/internal/protocoltest/query/api_op_XmlEmptyLists_test.go +++ b/internal/protocoltest/query/api_op_XmlEmptyLists_test.go @@ -6,15 +6,11 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -98,19 +94,7 @@ func TestClient_XmlEmptyLists_awsAwsqueryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/api_op_XmlEmptyMaps_test.go b/internal/protocoltest/query/api_op_XmlEmptyMaps_test.go index 9c7aee2f6bc..8afd11192d3 100644 --- a/internal/protocoltest/query/api_op_XmlEmptyMaps_test.go +++ b/internal/protocoltest/query/api_op_XmlEmptyMaps_test.go @@ -7,15 +7,11 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/query/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -115,19 +111,7 @@ func TestClient_XmlEmptyMaps_awsAwsqueryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/api_op_XmlEnums_test.go b/internal/protocoltest/query/api_op_XmlEnums_test.go index eee81dcd17a..4c6fe2e38b2 100644 --- a/internal/protocoltest/query/api_op_XmlEnums_test.go +++ b/internal/protocoltest/query/api_op_XmlEnums_test.go @@ -7,15 +7,11 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/query/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -131,19 +127,7 @@ func TestClient_XmlEnums_awsAwsqueryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/api_op_XmlIntEnums_test.go b/internal/protocoltest/query/api_op_XmlIntEnums_test.go index e895f75af27..3e3ab1f9411 100644 --- a/internal/protocoltest/query/api_op_XmlIntEnums_test.go +++ b/internal/protocoltest/query/api_op_XmlIntEnums_test.go @@ -7,15 +7,11 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/query/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -131,19 +127,7 @@ func TestClient_XmlIntEnums_awsAwsqueryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/api_op_XmlLists_test.go b/internal/protocoltest/query/api_op_XmlLists_test.go index a86b3d97f5c..e37af9c729e 100644 --- a/internal/protocoltest/query/api_op_XmlLists_test.go +++ b/internal/protocoltest/query/api_op_XmlLists_test.go @@ -7,17 +7,13 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/query/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" "time" @@ -226,19 +222,7 @@ func TestClient_XmlLists_awsAwsqueryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/api_op_XmlMapsXmlName_test.go b/internal/protocoltest/query/api_op_XmlMapsXmlName_test.go index 32f4c43587a..68f19ca5f88 100644 --- a/internal/protocoltest/query/api_op_XmlMapsXmlName_test.go +++ b/internal/protocoltest/query/api_op_XmlMapsXmlName_test.go @@ -7,16 +7,12 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/query/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -118,19 +114,7 @@ func TestClient_XmlMapsXmlName_awsAwsqueryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/api_op_XmlMaps_test.go b/internal/protocoltest/query/api_op_XmlMaps_test.go index 34758fa9e33..3bbe76c2060 100644 --- a/internal/protocoltest/query/api_op_XmlMaps_test.go +++ b/internal/protocoltest/query/api_op_XmlMaps_test.go @@ -7,16 +7,12 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/query/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -118,19 +114,7 @@ func TestClient_XmlMaps_awsAwsqueryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/api_op_XmlNamespaces_test.go b/internal/protocoltest/query/api_op_XmlNamespaces_test.go index cb105679e8e..26c3f9af009 100644 --- a/internal/protocoltest/query/api_op_XmlNamespaces_test.go +++ b/internal/protocoltest/query/api_op_XmlNamespaces_test.go @@ -7,16 +7,12 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/query/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -110,19 +106,7 @@ func TestClient_XmlNamespaces_awsAwsqueryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/api_op_XmlTimestamps_test.go b/internal/protocoltest/query/api_op_XmlTimestamps_test.go index 463c6cc9728..bd002fdeb71 100644 --- a/internal/protocoltest/query/api_op_XmlTimestamps_test.go +++ b/internal/protocoltest/query/api_op_XmlTimestamps_test.go @@ -6,17 +6,13 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -201,19 +197,7 @@ func TestClient_XmlTimestamps_awsAwsqueryDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/query/generated.json b/internal/protocoltest/query/generated.json index 259e43462f8..d177b3582b8 100644 --- a/internal/protocoltest/query/generated.json +++ b/internal/protocoltest/query/generated.json @@ -3,8 +3,7 @@ "github.com/aws/aws-sdk-go-v2": "v1.4.0", "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", - "github.com/aws/smithy-go": "v1.4.0", - "github.com/google/go-cmp": "v0.5.4" + "github.com/aws/smithy-go": "v1.4.0" }, "files": [ "api_client.go", diff --git a/internal/protocoltest/query/go.mod b/internal/protocoltest/query/go.mod index b00efc9087a..c65d35b41ec 100644 --- a/internal/protocoltest/query/go.mod +++ b/internal/protocoltest/query/go.mod @@ -7,9 +7,10 @@ require ( github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0 github.com/aws/smithy-go v1.20.0 - github.com/google/go-cmp v0.5.8 ) +require github.com/google/go-cmp v0.5.8 // indirect + replace github.com/aws/aws-sdk-go-v2 => ../../../ replace github.com/aws/aws-sdk-go-v2/internal/configsources => ../../../internal/configsources/ diff --git a/internal/protocoltest/restxml/api_op_BodyWithXmlName_test.go b/internal/protocoltest/restxml/api_op_BodyWithXmlName_test.go index df2f965a88f..4386ce0d917 100644 --- a/internal/protocoltest/restxml/api_op_BodyWithXmlName_test.go +++ b/internal/protocoltest/restxml/api_op_BodyWithXmlName_test.go @@ -8,18 +8,14 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -200,19 +196,7 @@ func TestClient_BodyWithXmlName_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_DatetimeOffsets_test.go b/internal/protocoltest/restxml/api_op_DatetimeOffsets_test.go index 6356435c0dc..9e6bc9d5b04 100644 --- a/internal/protocoltest/restxml/api_op_DatetimeOffsets_test.go +++ b/internal/protocoltest/restxml/api_op_DatetimeOffsets_test.go @@ -6,17 +6,13 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -111,19 +107,7 @@ func TestClient_DatetimeOffsets_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_EmptyInputAndEmptyOutput_test.go b/internal/protocoltest/restxml/api_op_EmptyInputAndEmptyOutput_test.go index 1cedf0b29cb..8d189cbc34a 100644 --- a/internal/protocoltest/restxml/api_op_EmptyInputAndEmptyOutput_test.go +++ b/internal/protocoltest/restxml/api_op_EmptyInputAndEmptyOutput_test.go @@ -7,17 +7,13 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -179,19 +175,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlName_test.go b/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlName_test.go index 40e15c42bbd..34d3f92cb52 100644 --- a/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlName_test.go +++ b/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlName_test.go @@ -7,17 +7,13 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -215,19 +211,7 @@ func TestClient_FlattenedXmlMapWithXmlName_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlNamespace_test.go b/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlNamespace_test.go index 0f3dd3af0db..ce483af2cd5 100644 --- a/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlNamespace_test.go +++ b/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlNamespace_test.go @@ -6,15 +6,11 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -104,19 +100,7 @@ func TestClient_FlattenedXmlMapWithXmlNamespace_awsRestxmlDeserialize(t *testing if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_FlattenedXmlMap_test.go b/internal/protocoltest/restxml/api_op_FlattenedXmlMap_test.go index db95385c4f8..015a644afad 100644 --- a/internal/protocoltest/restxml/api_op_FlattenedXmlMap_test.go +++ b/internal/protocoltest/restxml/api_op_FlattenedXmlMap_test.go @@ -8,17 +8,13 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -216,19 +212,7 @@ func TestClient_FlattenedXmlMap_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_FractionalSeconds_test.go b/internal/protocoltest/restxml/api_op_FractionalSeconds_test.go index 21c0b18a104..5a89dab1c72 100644 --- a/internal/protocoltest/restxml/api_op_FractionalSeconds_test.go +++ b/internal/protocoltest/restxml/api_op_FractionalSeconds_test.go @@ -6,17 +6,13 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -97,19 +93,7 @@ func TestClient_FractionalSeconds_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_GreetingWithErrors_test.go b/internal/protocoltest/restxml/api_op_GreetingWithErrors_test.go index d2873bae743..aec5039cabd 100644 --- a/internal/protocoltest/restxml/api_op_GreetingWithErrors_test.go +++ b/internal/protocoltest/restxml/api_op_GreetingWithErrors_test.go @@ -8,16 +8,12 @@ import ( "errors" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -94,19 +90,7 @@ func TestClient_GreetingWithErrors_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) @@ -211,19 +195,7 @@ func TestClient_GreetingWithErrors_InvalidGreeting_awsRestxmlDeserialize(t *test if !errors.As(err, &actualErr) { t.Fatalf("expect *types.InvalidGreeting result error, got %T", err) } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectError, actualErr, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectError, actualErr); err != nil { t.Errorf("expect c.ExpectError value match:\n%v", err) } }) @@ -335,19 +307,7 @@ func TestClient_GreetingWithErrors_ComplexError_awsRestxmlDeserialize(t *testing if !errors.As(err, &actualErr) { t.Fatalf("expect *types.ComplexError result error, got %T", err) } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectError, actualErr, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectError, actualErr); err != nil { t.Errorf("expect c.ExpectError value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_HttpEnumPayload_test.go b/internal/protocoltest/restxml/api_op_HttpEnumPayload_test.go index 9cfbe42943c..1babdb7f97a 100644 --- a/internal/protocoltest/restxml/api_op_HttpEnumPayload_test.go +++ b/internal/protocoltest/restxml/api_op_HttpEnumPayload_test.go @@ -8,17 +8,13 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -182,19 +178,7 @@ func TestClient_HttpEnumPayload_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadTraitsWithMediaType_test.go b/internal/protocoltest/restxml/api_op_HttpPayloadTraitsWithMediaType_test.go index 984e7c5df4c..a71cb0afc84 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadTraitsWithMediaType_test.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadTraitsWithMediaType_test.go @@ -7,18 +7,14 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -197,19 +193,7 @@ func TestClient_HttpPayloadTraitsWithMediaType_awsRestxmlDeserialize(t *testing. if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadTraits_test.go b/internal/protocoltest/restxml/api_op_HttpPayloadTraits_test.go index 533ee4c32f4..6769536f312 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadTraits_test.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadTraits_test.go @@ -7,18 +7,14 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -221,19 +217,7 @@ func TestClient_HttpPayloadTraits_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadWithMemberXmlName_test.go b/internal/protocoltest/restxml/api_op_HttpPayloadWithMemberXmlName_test.go index 0eb2b96efd5..63af0117f26 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadWithMemberXmlName_test.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadWithMemberXmlName_test.go @@ -8,18 +8,14 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -202,19 +198,7 @@ func TestClient_HttpPayloadWithMemberXmlName_awsRestxmlDeserialize(t *testing.T) if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadWithStructure_test.go b/internal/protocoltest/restxml/api_op_HttpPayloadWithStructure_test.go index fd50982de79..79babb9e85e 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadWithStructure_test.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadWithStructure_test.go @@ -8,18 +8,14 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -210,19 +206,7 @@ func TestClient_HttpPayloadWithStructure_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadWithUnion_test.go b/internal/protocoltest/restxml/api_op_HttpPayloadWithUnion_test.go index 5bf002cd49c..eac31d0d219 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadWithUnion_test.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadWithUnion_test.go @@ -8,17 +8,13 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -229,19 +225,7 @@ func TestClient_HttpPayloadWithUnion_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlName_test.go b/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlName_test.go index 094da7718cc..6d9efd6e6bf 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlName_test.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlName_test.go @@ -8,18 +8,14 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -200,19 +196,7 @@ func TestClient_HttpPayloadWithXmlName_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespaceAndPrefix_test.go b/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespaceAndPrefix_test.go index 1922ebe1c5e..569223aa389 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespaceAndPrefix_test.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespaceAndPrefix_test.go @@ -8,18 +8,14 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -204,19 +200,7 @@ func TestClient_HttpPayloadWithXmlNamespaceAndPrefix_awsRestxmlDeserialize(t *te if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespace_test.go b/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespace_test.go index 52d64c4a707..96d1bdda3e7 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespace_test.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespace_test.go @@ -8,18 +8,14 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -204,19 +200,7 @@ func TestClient_HttpPayloadWithXmlNamespace_awsRestxmlDeserialize(t *testing.T) if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_HttpPrefixHeaders_test.go b/internal/protocoltest/restxml/api_op_HttpPrefixHeaders_test.go index 3252ca04102..018e8de3053 100644 --- a/internal/protocoltest/restxml/api_op_HttpPrefixHeaders_test.go +++ b/internal/protocoltest/restxml/api_op_HttpPrefixHeaders_test.go @@ -7,18 +7,14 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -234,19 +230,7 @@ func TestClient_HttpPrefixHeaders_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_HttpResponseCode_test.go b/internal/protocoltest/restxml/api_op_HttpResponseCode_test.go index 7024c8406fb..2cf7f1fe942 100644 --- a/internal/protocoltest/restxml/api_op_HttpResponseCode_test.go +++ b/internal/protocoltest/restxml/api_op_HttpResponseCode_test.go @@ -6,16 +6,12 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -92,19 +88,7 @@ func TestClient_HttpResponseCode_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_HttpStringPayload_test.go b/internal/protocoltest/restxml/api_op_HttpStringPayload_test.go index 3920abab4ac..2cba8d553d0 100644 --- a/internal/protocoltest/restxml/api_op_HttpStringPayload_test.go +++ b/internal/protocoltest/restxml/api_op_HttpStringPayload_test.go @@ -7,18 +7,14 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -182,19 +178,7 @@ func TestClient_HttpStringPayload_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_IgnoreQueryParamsInResponse_test.go b/internal/protocoltest/restxml/api_op_IgnoreQueryParamsInResponse_test.go index 4b3ac52fe08..4bc23285433 100644 --- a/internal/protocoltest/restxml/api_op_IgnoreQueryParamsInResponse_test.go +++ b/internal/protocoltest/restxml/api_op_IgnoreQueryParamsInResponse_test.go @@ -6,16 +6,12 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -92,19 +88,7 @@ func TestClient_IgnoreQueryParamsInResponse_awsRestxmlDeserialize(t *testing.T) if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_InputAndOutputWithHeaders_test.go b/internal/protocoltest/restxml/api_op_InputAndOutputWithHeaders_test.go index 7903f91ed08..e80ad1f908b 100644 --- a/internal/protocoltest/restxml/api_op_InputAndOutputWithHeaders_test.go +++ b/internal/protocoltest/restxml/api_op_InputAndOutputWithHeaders_test.go @@ -8,7 +8,6 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" @@ -16,8 +15,6 @@ import ( smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" "math" @@ -477,19 +474,7 @@ func TestClient_InputAndOutputWithHeaders_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_NestedXmlMaps_test.go b/internal/protocoltest/restxml/api_op_NestedXmlMaps_test.go index 7f29a89b84c..42033ac423e 100644 --- a/internal/protocoltest/restxml/api_op_NestedXmlMaps_test.go +++ b/internal/protocoltest/restxml/api_op_NestedXmlMaps_test.go @@ -8,17 +8,13 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -282,19 +278,7 @@ func TestClient_NestedXmlMaps_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_NoInputAndNoOutput_test.go b/internal/protocoltest/restxml/api_op_NoInputAndNoOutput_test.go index c3c52520490..c81d358672a 100644 --- a/internal/protocoltest/restxml/api_op_NoInputAndNoOutput_test.go +++ b/internal/protocoltest/restxml/api_op_NoInputAndNoOutput_test.go @@ -7,17 +7,13 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -179,19 +175,7 @@ func TestClient_NoInputAndNoOutput_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_NoInputAndOutput_test.go b/internal/protocoltest/restxml/api_op_NoInputAndOutput_test.go index 4a8776bd51c..4ade001f8ed 100644 --- a/internal/protocoltest/restxml/api_op_NoInputAndOutput_test.go +++ b/internal/protocoltest/restxml/api_op_NoInputAndOutput_test.go @@ -7,17 +7,13 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -179,19 +175,7 @@ func TestClient_NoInputAndOutput_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_RecursiveShapes_test.go b/internal/protocoltest/restxml/api_op_RecursiveShapes_test.go index 011c269c528..7716230d4bb 100644 --- a/internal/protocoltest/restxml/api_op_RecursiveShapes_test.go +++ b/internal/protocoltest/restxml/api_op_RecursiveShapes_test.go @@ -8,18 +8,14 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -243,19 +239,7 @@ func TestClient_RecursiveShapes_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_SimpleScalarProperties_test.go b/internal/protocoltest/restxml/api_op_SimpleScalarProperties_test.go index 811ca2be5a3..e06d9dffd59 100644 --- a/internal/protocoltest/restxml/api_op_SimpleScalarProperties_test.go +++ b/internal/protocoltest/restxml/api_op_SimpleScalarProperties_test.go @@ -7,15 +7,12 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" "math" @@ -505,19 +502,7 @@ func TestClient_SimpleScalarProperties_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_TimestampFormatHeaders_test.go b/internal/protocoltest/restxml/api_op_TimestampFormatHeaders_test.go index 31a0c96d65f..6e90edfe600 100644 --- a/internal/protocoltest/restxml/api_op_TimestampFormatHeaders_test.go +++ b/internal/protocoltest/restxml/api_op_TimestampFormatHeaders_test.go @@ -7,7 +7,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" @@ -15,11 +14,8 @@ import ( smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -215,19 +211,7 @@ func TestClient_TimestampFormatHeaders_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_XmlAttributesOnPayload_test.go b/internal/protocoltest/restxml/api_op_XmlAttributesOnPayload_test.go index 2d69a7b6407..062ead516d7 100644 --- a/internal/protocoltest/restxml/api_op_XmlAttributesOnPayload_test.go +++ b/internal/protocoltest/restxml/api_op_XmlAttributesOnPayload_test.go @@ -8,18 +8,14 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -205,19 +201,7 @@ func TestClient_XmlAttributesOnPayload_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_XmlAttributes_test.go b/internal/protocoltest/restxml/api_op_XmlAttributes_test.go index fa10ed3d094..2fceaf5942f 100644 --- a/internal/protocoltest/restxml/api_op_XmlAttributes_test.go +++ b/internal/protocoltest/restxml/api_op_XmlAttributes_test.go @@ -7,18 +7,14 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -220,19 +216,7 @@ func TestClient_XmlAttributes_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_XmlBlobs_test.go b/internal/protocoltest/restxml/api_op_XmlBlobs_test.go index d622aa1ac53..f636ead7ca4 100644 --- a/internal/protocoltest/restxml/api_op_XmlBlobs_test.go +++ b/internal/protocoltest/restxml/api_op_XmlBlobs_test.go @@ -7,17 +7,13 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -197,19 +193,7 @@ func TestClient_XmlBlobs_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_XmlEmptyBlobs_test.go b/internal/protocoltest/restxml/api_op_XmlEmptyBlobs_test.go index 0f17ff9ee4e..689bc610c7e 100644 --- a/internal/protocoltest/restxml/api_op_XmlEmptyBlobs_test.go +++ b/internal/protocoltest/restxml/api_op_XmlEmptyBlobs_test.go @@ -6,15 +6,11 @@ import ( "bytes" "context" "github.com/aws/aws-sdk-go-v2/aws" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io/ioutil" - "math" "net/http" "testing" ) @@ -109,19 +105,7 @@ func TestClient_XmlEmptyBlobs_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_XmlEmptyLists_test.go b/internal/protocoltest/restxml/api_op_XmlEmptyLists_test.go index d2215f1bfa2..2700b40a82f 100644 --- a/internal/protocoltest/restxml/api_op_XmlEmptyLists_test.go +++ b/internal/protocoltest/restxml/api_op_XmlEmptyLists_test.go @@ -7,17 +7,13 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -201,19 +197,7 @@ func TestClient_XmlEmptyLists_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_XmlEmptyMaps_test.go b/internal/protocoltest/restxml/api_op_XmlEmptyMaps_test.go index 380de2a58dd..815320c2875 100644 --- a/internal/protocoltest/restxml/api_op_XmlEmptyMaps_test.go +++ b/internal/protocoltest/restxml/api_op_XmlEmptyMaps_test.go @@ -8,17 +8,13 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -213,19 +209,7 @@ func TestClient_XmlEmptyMaps_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_XmlEmptyStrings_test.go b/internal/protocoltest/restxml/api_op_XmlEmptyStrings_test.go index 54173040305..84da3fc03eb 100644 --- a/internal/protocoltest/restxml/api_op_XmlEmptyStrings_test.go +++ b/internal/protocoltest/restxml/api_op_XmlEmptyStrings_test.go @@ -7,18 +7,14 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -213,19 +209,7 @@ func TestClient_XmlEmptyStrings_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_XmlEnums_test.go b/internal/protocoltest/restxml/api_op_XmlEnums_test.go index 61a97373ef8..193941797c9 100644 --- a/internal/protocoltest/restxml/api_op_XmlEnums_test.go +++ b/internal/protocoltest/restxml/api_op_XmlEnums_test.go @@ -8,17 +8,13 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -266,19 +262,7 @@ func TestClient_XmlEnums_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_XmlIntEnums_test.go b/internal/protocoltest/restxml/api_op_XmlIntEnums_test.go index c3136507767..15569bc969d 100644 --- a/internal/protocoltest/restxml/api_op_XmlIntEnums_test.go +++ b/internal/protocoltest/restxml/api_op_XmlIntEnums_test.go @@ -8,17 +8,13 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -266,19 +262,7 @@ func TestClient_XmlIntEnums_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_XmlLists_test.go b/internal/protocoltest/restxml/api_op_XmlLists_test.go index a31855f3629..c24d84d07c4 100644 --- a/internal/protocoltest/restxml/api_op_XmlLists_test.go +++ b/internal/protocoltest/restxml/api_op_XmlLists_test.go @@ -8,7 +8,6 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" @@ -16,11 +15,8 @@ import ( smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -477,19 +473,7 @@ func TestClient_XmlLists_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_XmlMapWithXmlNamespace_test.go b/internal/protocoltest/restxml/api_op_XmlMapWithXmlNamespace_test.go index 9fbb633e486..b7655478fca 100644 --- a/internal/protocoltest/restxml/api_op_XmlMapWithXmlNamespace_test.go +++ b/internal/protocoltest/restxml/api_op_XmlMapWithXmlNamespace_test.go @@ -7,17 +7,13 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -219,19 +215,7 @@ func TestClient_XmlMapWithXmlNamespace_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_XmlMapsXmlName_test.go b/internal/protocoltest/restxml/api_op_XmlMapsXmlName_test.go index 65039bcde2b..73e945fda30 100644 --- a/internal/protocoltest/restxml/api_op_XmlMapsXmlName_test.go +++ b/internal/protocoltest/restxml/api_op_XmlMapsXmlName_test.go @@ -8,18 +8,14 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -239,19 +235,7 @@ func TestClient_XmlMapsXmlName_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_XmlMaps_test.go b/internal/protocoltest/restxml/api_op_XmlMaps_test.go index af87e82533e..38496aa5702 100644 --- a/internal/protocoltest/restxml/api_op_XmlMaps_test.go +++ b/internal/protocoltest/restxml/api_op_XmlMaps_test.go @@ -8,18 +8,14 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -239,19 +235,7 @@ func TestClient_XmlMaps_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_XmlNamespaces_test.go b/internal/protocoltest/restxml/api_op_XmlNamespaces_test.go index 22fa81b81d2..0cc8c946973 100644 --- a/internal/protocoltest/restxml/api_op_XmlNamespaces_test.go +++ b/internal/protocoltest/restxml/api_op_XmlNamespaces_test.go @@ -8,18 +8,14 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -223,19 +219,7 @@ func TestClient_XmlNamespaces_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_XmlTimestamps_test.go b/internal/protocoltest/restxml/api_op_XmlTimestamps_test.go index cde088b551d..972e3721467 100644 --- a/internal/protocoltest/restxml/api_op_XmlTimestamps_test.go +++ b/internal/protocoltest/restxml/api_op_XmlTimestamps_test.go @@ -7,7 +7,6 @@ import ( "context" "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" @@ -15,11 +14,8 @@ import ( smithytesting "github.com/aws/smithy-go/testing" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -405,19 +401,7 @@ func TestClient_XmlTimestamps_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/api_op_XmlUnions_test.go b/internal/protocoltest/restxml/api_op_XmlUnions_test.go index f8c78b794a7..0273284b542 100644 --- a/internal/protocoltest/restxml/api_op_XmlUnions_test.go +++ b/internal/protocoltest/restxml/api_op_XmlUnions_test.go @@ -8,18 +8,14 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithyrand "github.com/aws/smithy-go/rand" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -357,19 +353,7 @@ func TestClient_XmlUnions_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxml/generated.json b/internal/protocoltest/restxml/generated.json index ea5b928a8f1..3dfdf4516bb 100644 --- a/internal/protocoltest/restxml/generated.json +++ b/internal/protocoltest/restxml/generated.json @@ -3,8 +3,7 @@ "github.com/aws/aws-sdk-go-v2": "v1.4.0", "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", - "github.com/aws/smithy-go": "v1.4.0", - "github.com/google/go-cmp": "v0.5.4" + "github.com/aws/smithy-go": "v1.4.0" }, "files": [ "api_client.go", diff --git a/internal/protocoltest/restxml/go.mod b/internal/protocoltest/restxml/go.mod index a404d4a259b..48018f6fad7 100644 --- a/internal/protocoltest/restxml/go.mod +++ b/internal/protocoltest/restxml/go.mod @@ -7,9 +7,10 @@ require ( github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0 github.com/aws/smithy-go v1.20.0 - github.com/google/go-cmp v0.5.8 ) +require github.com/google/go-cmp v0.5.8 // indirect + replace github.com/aws/aws-sdk-go-v2 => ../../../ replace github.com/aws/aws-sdk-go-v2/internal/configsources => ../../../internal/configsources/ diff --git a/internal/protocoltest/restxmlwithnamespace/api_op_SimpleScalarProperties_test.go b/internal/protocoltest/restxmlwithnamespace/api_op_SimpleScalarProperties_test.go index 2e334af22eb..89cb4ebd54f 100644 --- a/internal/protocoltest/restxmlwithnamespace/api_op_SimpleScalarProperties_test.go +++ b/internal/protocoltest/restxmlwithnamespace/api_op_SimpleScalarProperties_test.go @@ -8,17 +8,13 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" "github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxmlwithnamespace/types" - smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/middleware" smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" "github.com/aws/smithy-go/ptr" smithytesting "github.com/aws/smithy-go/testing" smithyhttp "github.com/aws/smithy-go/transport/http" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" "io" "io/ioutil" - "math" "net/http" "net/url" "testing" @@ -240,19 +236,7 @@ func TestClient_SimpleScalarProperties_awsRestxmlDeserialize(t *testing.T) { if result == nil { t.Fatalf("expect not nil result") } - opts := cmp.Options{ - cmpopts.IgnoreUnexported( - middleware.Metadata{}, - ), - cmp.FilterValues(func(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmp.FilterValues(func(x, y float32) bool { - return math.IsNaN(float64(x)) && math.IsNaN(float64(y)) - }, cmp.Comparer(func(_, _ interface{}) bool { return true })), - cmpopts.IgnoreTypes(smithydocument.NoSerde{}), - } - if err := smithytesting.CompareValues(c.ExpectResult, result, opts...); err != nil { + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { t.Errorf("expect c.ExpectResult value match:\n%v", err) } }) diff --git a/internal/protocoltest/restxmlwithnamespace/generated.json b/internal/protocoltest/restxmlwithnamespace/generated.json index f4002b00f34..8fcd73cd121 100644 --- a/internal/protocoltest/restxmlwithnamespace/generated.json +++ b/internal/protocoltest/restxmlwithnamespace/generated.json @@ -3,8 +3,7 @@ "github.com/aws/aws-sdk-go-v2": "v1.4.0", "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", - "github.com/aws/smithy-go": "v1.4.0", - "github.com/google/go-cmp": "v0.5.4" + "github.com/aws/smithy-go": "v1.4.0" }, "files": [ "api_client.go", diff --git a/internal/protocoltest/restxmlwithnamespace/go.mod b/internal/protocoltest/restxmlwithnamespace/go.mod index 7ad78bbf61e..9b6754ac2e5 100644 --- a/internal/protocoltest/restxmlwithnamespace/go.mod +++ b/internal/protocoltest/restxmlwithnamespace/go.mod @@ -7,9 +7,10 @@ require ( github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0 github.com/aws/smithy-go v1.20.0 - github.com/google/go-cmp v0.5.8 ) +require github.com/google/go-cmp v0.5.8 // indirect + replace github.com/aws/aws-sdk-go-v2 => ../../../ replace github.com/aws/aws-sdk-go-v2/internal/configsources => ../../../internal/configsources/