vendor: update all dependencies to latest versions

This commit is contained in:
Nick Craig-Wood 2017-09-30 15:27:27 +01:00
parent 911d121bb9
commit b017fcfe9a
3048 changed files with 537057 additions and 189681 deletions

View file

@ -55,13 +55,6 @@ func BenchmarkRESTXMLBuild_Complex_CFCreateDistro(b *testing.B) {
})
}
func BenchmarkRESTXMLRequest_Complex_CFCreateDistro(b *testing.B) {
benchRESTXMLRequest(b, func() *request.Request {
req, _ := cloudfrontSvc.CreateDistributionRequest(cloudfrontCreateDistributionInput())
return req
})
}
func BenchmarkRESTXMLBuild_Simple_CFDeleteDistro(b *testing.B) {
params := cloudfrontDeleteDistributionInput()
@ -71,13 +64,6 @@ func BenchmarkRESTXMLBuild_Simple_CFDeleteDistro(b *testing.B) {
})
}
func BenchmarkRESTXMLRequest_Simple_CFDeleteDistro(b *testing.B) {
benchRESTXMLRequest(b, func() *request.Request {
req, _ := cloudfrontSvc.DeleteDistributionRequest(cloudfrontDeleteDistributionInput())
return req
})
}
func BenchmarkRESTXMLBuild_REST_S3HeadObject(b *testing.B) {
params := s3HeadObjectInput()
@ -87,13 +73,6 @@ func BenchmarkRESTXMLBuild_REST_S3HeadObject(b *testing.B) {
})
}
func BenchmarkRESTXMLRequest_REST_S3HeadObject(b *testing.B) {
benchRESTXMLRequest(b, func() *request.Request {
req, _ := s3Svc.HeadObjectRequest(s3HeadObjectInput())
return req
})
}
func BenchmarkRESTXMLBuild_XML_S3PutObjectAcl(b *testing.B) {
params := s3PutObjectAclInput()
@ -103,6 +82,27 @@ func BenchmarkRESTXMLBuild_XML_S3PutObjectAcl(b *testing.B) {
})
}
func BenchmarkRESTXMLRequest_Complex_CFCreateDistro(b *testing.B) {
benchRESTXMLRequest(b, func() *request.Request {
req, _ := cloudfrontSvc.CreateDistributionRequest(cloudfrontCreateDistributionInput())
return req
})
}
func BenchmarkRESTXMLRequest_Simple_CFDeleteDistro(b *testing.B) {
benchRESTXMLRequest(b, func() *request.Request {
req, _ := cloudfrontSvc.DeleteDistributionRequest(cloudfrontDeleteDistributionInput())
return req
})
}
func BenchmarkRESTXMLRequest_REST_S3HeadObject(b *testing.B) {
benchRESTXMLRequest(b, func() *request.Request {
req, _ := s3Svc.HeadObjectRequest(s3HeadObjectInput())
return req
})
}
func BenchmarkRESTXMLRequest_XML_S3PutObjectAcl(b *testing.B) {
benchRESTXMLRequest(b, func() *request.Request {
req, _ := s3Svc.PutObjectAclRequest(s3PutObjectAclInput())

File diff suppressed because it is too large Load diff

View file

@ -24,7 +24,6 @@ import (
"github.com/aws/aws-sdk-go/private/protocol/restxml"
"github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"
"github.com/aws/aws-sdk-go/private/util"
"github.com/stretchr/testify/assert"
)
var _ bytes.Buffer // always import bytes
@ -108,19 +107,18 @@ const opOutputService1TestCaseOperation1 = "OperationName"
// OutputService1TestCaseOperation1Request generates a "aws/request.Request" representing the
// client's request for the OutputService1TestCaseOperation1 operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See OutputService1TestCaseOperation1 for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the OutputService1TestCaseOperation1 method directly
// instead.
// See OutputService1TestCaseOperation1 for more information on using the OutputService1TestCaseOperation1
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the OutputService1TestCaseOperation1Request method.
// req, resp := client.OutputService1TestCaseOperation1Request(params)
@ -177,19 +175,18 @@ const opOutputService1TestCaseOperation2 = "OperationName"
// OutputService1TestCaseOperation2Request generates a "aws/request.Request" representing the
// client's request for the OutputService1TestCaseOperation2 operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See OutputService1TestCaseOperation2 for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the OutputService1TestCaseOperation2 method directly
// instead.
// See OutputService1TestCaseOperation2 for more information on using the OutputService1TestCaseOperation2
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the OutputService1TestCaseOperation2Request method.
// req, resp := client.OutputService1TestCaseOperation2Request(params)
@ -405,19 +402,18 @@ const opOutputService2TestCaseOperation1 = "OperationName"
// OutputService2TestCaseOperation1Request generates a "aws/request.Request" representing the
// client's request for the OutputService2TestCaseOperation1 operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See OutputService2TestCaseOperation1 for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the OutputService2TestCaseOperation1 method directly
// instead.
// See OutputService2TestCaseOperation1 for more information on using the OutputService2TestCaseOperation1
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the OutputService2TestCaseOperation1Request method.
// req, resp := client.OutputService2TestCaseOperation1Request(params)
@ -550,19 +546,18 @@ const opOutputService3TestCaseOperation1 = "OperationName"
// OutputService3TestCaseOperation1Request generates a "aws/request.Request" representing the
// client's request for the OutputService3TestCaseOperation1 operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See OutputService3TestCaseOperation1 for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the OutputService3TestCaseOperation1 method directly
// instead.
// See OutputService3TestCaseOperation1 for more information on using the OutputService3TestCaseOperation1
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the OutputService3TestCaseOperation1Request method.
// req, resp := client.OutputService3TestCaseOperation1Request(params)
@ -694,19 +689,18 @@ const opOutputService4TestCaseOperation1 = "OperationName"
// OutputService4TestCaseOperation1Request generates a "aws/request.Request" representing the
// client's request for the OutputService4TestCaseOperation1 operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See OutputService4TestCaseOperation1 for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the OutputService4TestCaseOperation1 method directly
// instead.
// See OutputService4TestCaseOperation1 for more information on using the OutputService4TestCaseOperation1
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the OutputService4TestCaseOperation1Request method.
// req, resp := client.OutputService4TestCaseOperation1Request(params)
@ -838,19 +832,18 @@ const opOutputService5TestCaseOperation1 = "OperationName"
// OutputService5TestCaseOperation1Request generates a "aws/request.Request" representing the
// client's request for the OutputService5TestCaseOperation1 operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See OutputService5TestCaseOperation1 for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the OutputService5TestCaseOperation1 method directly
// instead.
// See OutputService5TestCaseOperation1 for more information on using the OutputService5TestCaseOperation1
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the OutputService5TestCaseOperation1Request method.
// req, resp := client.OutputService5TestCaseOperation1Request(params)
@ -982,19 +975,18 @@ const opOutputService6TestCaseOperation1 = "OperationName"
// OutputService6TestCaseOperation1Request generates a "aws/request.Request" representing the
// client's request for the OutputService6TestCaseOperation1 operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See OutputService6TestCaseOperation1 for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the OutputService6TestCaseOperation1 method directly
// instead.
// See OutputService6TestCaseOperation1 for more information on using the OutputService6TestCaseOperation1
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the OutputService6TestCaseOperation1Request method.
// req, resp := client.OutputService6TestCaseOperation1Request(params)
@ -1138,19 +1130,18 @@ const opOutputService7TestCaseOperation1 = "OperationName"
// OutputService7TestCaseOperation1Request generates a "aws/request.Request" representing the
// client's request for the OutputService7TestCaseOperation1 operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See OutputService7TestCaseOperation1 for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the OutputService7TestCaseOperation1 method directly
// instead.
// See OutputService7TestCaseOperation1 for more information on using the OutputService7TestCaseOperation1
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the OutputService7TestCaseOperation1Request method.
// req, resp := client.OutputService7TestCaseOperation1Request(params)
@ -1282,19 +1273,18 @@ const opOutputService8TestCaseOperation1 = "OperationName"
// OutputService8TestCaseOperation1Request generates a "aws/request.Request" representing the
// client's request for the OutputService8TestCaseOperation1 operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See OutputService8TestCaseOperation1 for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the OutputService8TestCaseOperation1 method directly
// instead.
// See OutputService8TestCaseOperation1 for more information on using the OutputService8TestCaseOperation1
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the OutputService8TestCaseOperation1Request method.
// req, resp := client.OutputService8TestCaseOperation1Request(params)
@ -1426,19 +1416,18 @@ const opOutputService9TestCaseOperation1 = "OperationName"
// OutputService9TestCaseOperation1Request generates a "aws/request.Request" representing the
// client's request for the OutputService9TestCaseOperation1 operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See OutputService9TestCaseOperation1 for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the OutputService9TestCaseOperation1 method directly
// instead.
// See OutputService9TestCaseOperation1 for more information on using the OutputService9TestCaseOperation1
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the OutputService9TestCaseOperation1Request method.
// req, resp := client.OutputService9TestCaseOperation1Request(params)
@ -1590,19 +1579,18 @@ const opOutputService10TestCaseOperation1 = "OperationName"
// OutputService10TestCaseOperation1Request generates a "aws/request.Request" representing the
// client's request for the OutputService10TestCaseOperation1 operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See OutputService10TestCaseOperation1 for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the OutputService10TestCaseOperation1 method directly
// instead.
// See OutputService10TestCaseOperation1 for more information on using the OutputService10TestCaseOperation1
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the OutputService10TestCaseOperation1Request method.
// req, resp := client.OutputService10TestCaseOperation1Request(params)
@ -1734,19 +1722,18 @@ const opOutputService11TestCaseOperation1 = "OperationName"
// OutputService11TestCaseOperation1Request generates a "aws/request.Request" representing the
// client's request for the OutputService11TestCaseOperation1 operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See OutputService11TestCaseOperation1 for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the OutputService11TestCaseOperation1 method directly
// instead.
// See OutputService11TestCaseOperation1 for more information on using the OutputService11TestCaseOperation1
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the OutputService11TestCaseOperation1Request method.
// req, resp := client.OutputService11TestCaseOperation1Request(params)
@ -1942,19 +1929,18 @@ const opOutputService12TestCaseOperation1 = "OperationName"
// OutputService12TestCaseOperation1Request generates a "aws/request.Request" representing the
// client's request for the OutputService12TestCaseOperation1 operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See OutputService12TestCaseOperation1 for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the OutputService12TestCaseOperation1 method directly
// instead.
// See OutputService12TestCaseOperation1 for more information on using the OutputService12TestCaseOperation1
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the OutputService12TestCaseOperation1Request method.
// req, resp := client.OutputService12TestCaseOperation1Request(params)
@ -2041,21 +2027,47 @@ func TestOutputService1ProtocolTestScalarMembersCase1(t *testing.T) {
// unmarshal response
restxml.UnmarshalMeta(req)
restxml.Unmarshal(req)
assert.NoError(t, req.Error)
if req.Error != nil {
t.Errorf("expect not error, got %v", req.Error)
}
// assert response
assert.NotNil(t, out) // ensure out variable is used
assert.Equal(t, "a", *out.Char)
assert.Equal(t, 1.3, *out.Double)
assert.Equal(t, false, *out.FalseBool)
assert.Equal(t, 1.2, *out.Float)
assert.Equal(t, "test", *out.ImaHeader)
assert.Equal(t, "abc", *out.ImaHeaderLocation)
assert.Equal(t, int64(200), *out.Long)
assert.Equal(t, int64(123), *out.Num)
assert.Equal(t, "myname", *out.Str)
assert.Equal(t, time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String())
assert.Equal(t, true, *out.TrueBool)
if out == nil {
t.Errorf("expect not to be nil")
}
if e, a := "a", *out.Char; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := 1.3, *out.Double; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := false, *out.FalseBool; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := 1.2, *out.Float; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := "test", *out.ImaHeader; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := "abc", *out.ImaHeaderLocation; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := int64(200), *out.Long; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := int64(123), *out.Num; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := "myname", *out.Str; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String(); e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := true, *out.TrueBool; e != a {
t.Errorf("expect %v, got %v", e, a)
}
}
@ -2073,21 +2085,47 @@ func TestOutputService1ProtocolTestScalarMembersCase2(t *testing.T) {
// unmarshal response
restxml.UnmarshalMeta(req)
restxml.Unmarshal(req)
assert.NoError(t, req.Error)
if req.Error != nil {
t.Errorf("expect not error, got %v", req.Error)
}
// assert response
assert.NotNil(t, out) // ensure out variable is used
assert.Equal(t, "a", *out.Char)
assert.Equal(t, 1.3, *out.Double)
assert.Equal(t, false, *out.FalseBool)
assert.Equal(t, 1.2, *out.Float)
assert.Equal(t, "test", *out.ImaHeader)
assert.Equal(t, "abc", *out.ImaHeaderLocation)
assert.Equal(t, int64(200), *out.Long)
assert.Equal(t, int64(123), *out.Num)
assert.Equal(t, "", *out.Str)
assert.Equal(t, time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String())
assert.Equal(t, true, *out.TrueBool)
if out == nil {
t.Errorf("expect not to be nil")
}
if e, a := "a", *out.Char; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := 1.3, *out.Double; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := false, *out.FalseBool; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := 1.2, *out.Float; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := "test", *out.ImaHeader; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := "abc", *out.ImaHeaderLocation; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := int64(200), *out.Long; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := int64(123), *out.Num; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := "", *out.Str; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String(); e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := true, *out.TrueBool; e != a {
t.Errorf("expect %v, got %v", e, a)
}
}
@ -2103,11 +2141,17 @@ func TestOutputService2ProtocolTestBlobCase1(t *testing.T) {
// unmarshal response
restxml.UnmarshalMeta(req)
restxml.Unmarshal(req)
assert.NoError(t, req.Error)
if req.Error != nil {
t.Errorf("expect not error, got %v", req.Error)
}
// assert response
assert.NotNil(t, out) // ensure out variable is used
assert.Equal(t, "value", string(out.Blob))
if out == nil {
t.Errorf("expect not to be nil")
}
if e, a := "value", string(out.Blob); e != a {
t.Errorf("expect %v, got %v", e, a)
}
}
@ -2123,12 +2167,20 @@ func TestOutputService3ProtocolTestListsCase1(t *testing.T) {
// unmarshal response
restxml.UnmarshalMeta(req)
restxml.Unmarshal(req)
assert.NoError(t, req.Error)
if req.Error != nil {
t.Errorf("expect not error, got %v", req.Error)
}
// assert response
assert.NotNil(t, out) // ensure out variable is used
assert.Equal(t, "abc", *out.ListMember[0])
assert.Equal(t, "123", *out.ListMember[1])
if out == nil {
t.Errorf("expect not to be nil")
}
if e, a := "abc", *out.ListMember[0]; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := "123", *out.ListMember[1]; e != a {
t.Errorf("expect %v, got %v", e, a)
}
}
@ -2144,12 +2196,20 @@ func TestOutputService4ProtocolTestListWithCustomMemberNameCase1(t *testing.T) {
// unmarshal response
restxml.UnmarshalMeta(req)
restxml.Unmarshal(req)
assert.NoError(t, req.Error)
if req.Error != nil {
t.Errorf("expect not error, got %v", req.Error)
}
// assert response
assert.NotNil(t, out) // ensure out variable is used
assert.Equal(t, "abc", *out.ListMember[0])
assert.Equal(t, "123", *out.ListMember[1])
if out == nil {
t.Errorf("expect not to be nil")
}
if e, a := "abc", *out.ListMember[0]; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := "123", *out.ListMember[1]; e != a {
t.Errorf("expect %v, got %v", e, a)
}
}
@ -2165,12 +2225,20 @@ func TestOutputService5ProtocolTestFlattenedListCase1(t *testing.T) {
// unmarshal response
restxml.UnmarshalMeta(req)
restxml.Unmarshal(req)
assert.NoError(t, req.Error)
if req.Error != nil {
t.Errorf("expect not error, got %v", req.Error)
}
// assert response
assert.NotNil(t, out) // ensure out variable is used
assert.Equal(t, "abc", *out.ListMember[0])
assert.Equal(t, "123", *out.ListMember[1])
if out == nil {
t.Errorf("expect not to be nil")
}
if e, a := "abc", *out.ListMember[0]; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := "123", *out.ListMember[1]; e != a {
t.Errorf("expect %v, got %v", e, a)
}
}
@ -2186,12 +2254,20 @@ func TestOutputService6ProtocolTestNormalMapCase1(t *testing.T) {
// unmarshal response
restxml.UnmarshalMeta(req)
restxml.Unmarshal(req)
assert.NoError(t, req.Error)
if req.Error != nil {
t.Errorf("expect not error, got %v", req.Error)
}
// assert response
assert.NotNil(t, out) // ensure out variable is used
assert.Equal(t, "bam", *out.Map["baz"].Foo)
assert.Equal(t, "bar", *out.Map["qux"].Foo)
if out == nil {
t.Errorf("expect not to be nil")
}
if e, a := "bam", *out.Map["baz"].Foo; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := "bar", *out.Map["qux"].Foo; e != a {
t.Errorf("expect %v, got %v", e, a)
}
}
@ -2207,12 +2283,20 @@ func TestOutputService7ProtocolTestFlattenedMapCase1(t *testing.T) {
// unmarshal response
restxml.UnmarshalMeta(req)
restxml.Unmarshal(req)
assert.NoError(t, req.Error)
if req.Error != nil {
t.Errorf("expect not error, got %v", req.Error)
}
// assert response
assert.NotNil(t, out) // ensure out variable is used
assert.Equal(t, "bam", *out.Map["baz"])
assert.Equal(t, "bar", *out.Map["qux"])
if out == nil {
t.Errorf("expect not to be nil")
}
if e, a := "bam", *out.Map["baz"]; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := "bar", *out.Map["qux"]; e != a {
t.Errorf("expect %v, got %v", e, a)
}
}
@ -2228,12 +2312,20 @@ func TestOutputService8ProtocolTestNamedMapCase1(t *testing.T) {
// unmarshal response
restxml.UnmarshalMeta(req)
restxml.Unmarshal(req)
assert.NoError(t, req.Error)
if req.Error != nil {
t.Errorf("expect not error, got %v", req.Error)
}
// assert response
assert.NotNil(t, out) // ensure out variable is used
assert.Equal(t, "bam", *out.Map["baz"])
assert.Equal(t, "bar", *out.Map["qux"])
if out == nil {
t.Errorf("expect not to be nil")
}
if e, a := "bam", *out.Map["baz"]; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := "bar", *out.Map["qux"]; e != a {
t.Errorf("expect %v, got %v", e, a)
}
}
@ -2250,12 +2342,20 @@ func TestOutputService9ProtocolTestXMLPayloadCase1(t *testing.T) {
// unmarshal response
restxml.UnmarshalMeta(req)
restxml.Unmarshal(req)
assert.NoError(t, req.Error)
if req.Error != nil {
t.Errorf("expect not error, got %v", req.Error)
}
// assert response
assert.NotNil(t, out) // ensure out variable is used
assert.Equal(t, "abc", *out.Data.Foo)
assert.Equal(t, "baz", *out.Header)
if out == nil {
t.Errorf("expect not to be nil")
}
if e, a := "abc", *out.Data.Foo; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := "baz", *out.Header; e != a {
t.Errorf("expect %v, got %v", e, a)
}
}
@ -2271,11 +2371,17 @@ func TestOutputService10ProtocolTestStreamingPayloadCase1(t *testing.T) {
// unmarshal response
restxml.UnmarshalMeta(req)
restxml.Unmarshal(req)
assert.NoError(t, req.Error)
if req.Error != nil {
t.Errorf("expect not error, got %v", req.Error)
}
// assert response
assert.NotNil(t, out) // ensure out variable is used
assert.Equal(t, "abc", string(out.Stream))
if out == nil {
t.Errorf("expect not to be nil")
}
if e, a := "abc", string(out.Stream); e != a {
t.Errorf("expect %v, got %v", e, a)
}
}
@ -2300,19 +2406,41 @@ func TestOutputService11ProtocolTestScalarMembersInHeadersCase1(t *testing.T) {
// unmarshal response
restxml.UnmarshalMeta(req)
restxml.Unmarshal(req)
assert.NoError(t, req.Error)
if req.Error != nil {
t.Errorf("expect not error, got %v", req.Error)
}
// assert response
assert.NotNil(t, out) // ensure out variable is used
assert.Equal(t, "a", *out.Char)
assert.Equal(t, 1.5, *out.Double)
assert.Equal(t, false, *out.FalseBool)
assert.Equal(t, 1.5, *out.Float)
assert.Equal(t, int64(1), *out.Integer)
assert.Equal(t, int64(100), *out.Long)
assert.Equal(t, "string", *out.Str)
assert.Equal(t, time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String())
assert.Equal(t, true, *out.TrueBool)
if out == nil {
t.Errorf("expect not to be nil")
}
if e, a := "a", *out.Char; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := 1.5, *out.Double; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := false, *out.FalseBool; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := 1.5, *out.Float; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := int64(1), *out.Integer; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := int64(100), *out.Long; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := "string", *out.Str; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := time.Unix(1.4221728e+09, 0).UTC().String(), out.Timestamp.String(); e != a {
t.Errorf("expect %v, got %v", e, a)
}
if e, a := true, *out.TrueBool; e != a {
t.Errorf("expect %v, got %v", e, a)
}
}
@ -2328,10 +2456,16 @@ func TestOutputService12ProtocolTestEmptyStringCase1(t *testing.T) {
// unmarshal response
restxml.UnmarshalMeta(req)
restxml.Unmarshal(req)
assert.NoError(t, req.Error)
if req.Error != nil {
t.Errorf("expect not error, got %v", req.Error)
}
// assert response
assert.NotNil(t, out) // ensure out variable is used
assert.Equal(t, "", *out.Foo)
if out == nil {
t.Errorf("expect not to be nil")
}
if e, a := "", *out.Foo; e != a {
t.Errorf("expect %v, got %v", e, a)
}
}