diff --git a/Package.swift b/Package.swift index f39ee057483..9ddcb8a88ce 100644 --- a/Package.swift +++ b/Package.swift @@ -106,24 +106,11 @@ func addServiceTarget(_ name: String) { func addIntegrationTestTarget(_ name: String) { let integrationTestName = "\(name)IntegrationTests" - var additionalDependencies: [PackageDescription.Target.Dependency] = [] - var exclusions: [String] = [] - switch name { - case "AWSECS": - additionalDependencies = ["AWSCloudWatchLogs", "AWSEC2", "AWSIAM"] - exclusions = [ - "README.md", - "Resources/ECSIntegTestApp/" - ] - default: - break - } package.targets += [ .testTarget( name: integrationTestName, - dependencies: [.crt, .clientRuntime, .awsClientRuntime, .byName(name: name), .smithyTestUtils] + additionalDependencies, + dependencies: [.crt, .clientRuntime, .awsClientRuntime, .byName(name: name), .smithyTestUtils], path: "./IntegrationTests/Services/\(integrationTestName)", - exclude: exclusions, resources: [.process("Resources")] ) ] @@ -369,7 +356,6 @@ let serviceTargets: [String] = [ "AWSKinesisAnalytics", "AWSKinesisAnalyticsV2", "AWSKinesisVideo", - "AWSKinesisVideoArchivedMedia", "AWSKinesisVideoMedia", "AWSKinesisVideoSignaling", "AWSKinesisVideoWebRTCStorage", @@ -419,6 +405,7 @@ let serviceTargets: [String] = [ "AWSMobile", "AWSMq", "AWSNeptune", + "AWSNeptunedata", "AWSNetworkFirewall", "AWSNetworkManager", "AWSNimble", @@ -435,6 +422,7 @@ let serviceTargets: [String] = [ "AWSPanorama", "AWSPaymentCryptography", "AWSPaymentCryptographyData", + "AWSPcaConnectorAd", "AWSPersonalize", "AWSPersonalizeEvents", "AWSPersonalizeRuntime", @@ -549,4 +537,4 @@ let servicesWithIntegrationTests: [String] = [ servicesWithIntegrationTests.forEach(addIntegrationTestTarget) // Uncomment this line to enable protocol tests -// addProtocolTests() +addProtocolTests() \ No newline at end of file diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpBindingProtocolGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpBindingProtocolGenerator.kt index ffc54e8d904..a65a2927406 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpBindingProtocolGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpBindingProtocolGenerator.kt @@ -52,6 +52,7 @@ abstract class AWSHttpBindingProtocolGenerator : HttpBindingProtocolGenerator() val requestTestBuilder = HttpProtocolUnitTestRequestGenerator.Builder() val responseTestBuilder = HttpProtocolUnitTestResponseGenerator.Builder() val errorTestBuilder = HttpProtocolUnitTestErrorGenerator.Builder() + open val testsToIgnore: Set = setOf() override val shouldRenderDecodableBodyStructForInputShapes = true override val shouldRenderCodingKeysForEncodable = true @@ -68,6 +69,7 @@ abstract class AWSHttpBindingProtocolGenerator : HttpBindingProtocolGenerator() getProtocolHttpBindingResolver(ctx, defaultContentType), serdeContext, imports, + testsToIgnore ).generateProtocolTests() + renderEndpointsTests(ctx) } diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsjson/AwsJson1_0_ProtocolGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsjson/AwsJson1_0_ProtocolGenerator.kt index 6286a491ddb..b74b2f3f897 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsjson/AwsJson1_0_ProtocolGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsjson/AwsJson1_0_ProtocolGenerator.kt @@ -37,6 +37,10 @@ open class AwsJson1_0_ProtocolGenerator : AWSHttpBindingProtocolGenerator() { override val serdeContext = serdeContextJSON override val shouldRenderEncodableConformance: Boolean = true override val shouldRenderDecodableBodyStructForInputShapes: Boolean = true + override val testsToIgnore = setOf( + "SDKAppliedContentEncoding_awsJson1_0", + "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_0" + ) override fun getProtocolHttpBindingResolver(ctx: ProtocolGenerator.GenerationContext, defaultContentType: String): HttpBindingResolver = AwsJsonHttpBindingResolver(ctx, defaultContentType) diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsjson/AwsJson1_1_ProtocolGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsjson/AwsJson1_1_ProtocolGenerator.kt index 28405fa6c36..f46027ef00d 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsjson/AwsJson1_1_ProtocolGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsjson/AwsJson1_1_ProtocolGenerator.kt @@ -37,6 +37,10 @@ class AwsJson1_1_ProtocolGenerator : AWSHttpBindingProtocolGenerator() { override val serdeContext = serdeContextJSON override val shouldRenderEncodableConformance: Boolean = true override val shouldRenderDecodableBodyStructForInputShapes: Boolean = true + override val testsToIgnore = setOf( + "SDKAppliedContentEncoding_awsJson1_1", + "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsJson1_1" + ) override fun getProtocolHttpBindingResolver(ctx: ProtocolGenerator.GenerationContext, defaultContentType: String): HttpBindingResolver = AwsJsonHttpBindingResolver(ctx, defaultContentType) diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsquery/AwsQueryProtocolGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsquery/AwsQueryProtocolGenerator.kt index 0fea55e1484..8649ed45ba3 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsquery/AwsQueryProtocolGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsquery/AwsQueryProtocolGenerator.kt @@ -54,6 +54,10 @@ open class AwsQueryProtocolGenerator : AWSHttpBindingProtocolGenerator() { override val shouldRenderDecodableBodyStructForInputShapes = false override val shouldRenderCodingKeysForEncodable = false override val shouldRenderEncodableConformance = true + override val testsToIgnore = setOf( + "SDKAppliedContentEncoding_awsQuery", + "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_awsQuery" + ) override fun renderStructEncode( ctx: ProtocolGenerator.GenerationContext, shapeContainingMembers: Shape, diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/ec2query/Ec2QueryProtocolGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/ec2query/Ec2QueryProtocolGenerator.kt index 9a257c3af03..2fddfdf6032 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/ec2query/Ec2QueryProtocolGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/ec2query/Ec2QueryProtocolGenerator.kt @@ -50,6 +50,10 @@ class Ec2QueryProtocolGenerator : AWSHttpBindingProtocolGenerator() { override val shouldRenderDecodableBodyStructForInputShapes = false override val shouldRenderCodingKeysForEncodable = false override val shouldRenderEncodableConformance = true + override val testsToIgnore = setOf( + "SDKAppliedContentEncoding_ec2Query", + "SDKAppendsGzipAndIgnoresHttpProvidedEncoding_ec2Query" + ) override fun renderStructEncode( ctx: ProtocolGenerator.GenerationContext, shapeContainingMembers: Shape, diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restjson/AWSRestJson1ProtocolGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restjson/AWSRestJson1ProtocolGenerator.kt index 9626e69d1cf..8ad524b9f42 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restjson/AWSRestJson1ProtocolGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restjson/AWSRestJson1ProtocolGenerator.kt @@ -28,6 +28,10 @@ class AWSRestJson1ProtocolGenerator : AWSHttpBindingProtocolGenerator() { AWSRestJson1HttpResponseBindingErrorGeneratable() ) override val serdeContext = serdeContextJSON + override val testsToIgnore = setOf( + "SDKAppliedContentEncoding_restJson1", + "SDKAppendedGzipAfterProvidedEncoding_restJson1" + ) override fun generateMessageMarshallable(ctx: ProtocolGenerator.GenerationContext) { var streamingShapes = outputStreamingShapes(ctx) diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restxml/RestXmlProtocolGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restxml/RestXmlProtocolGenerator.kt index c50dc50a73f..9a15a4668cd 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restxml/RestXmlProtocolGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restxml/RestXmlProtocolGenerator.kt @@ -35,6 +35,19 @@ class RestXmlProtocolGenerator : AWSHttpBindingProtocolGenerator() { AWSXMLHttpResponseBindingErrorInitGeneratorFactory() ) override val serdeContext = serdeContextXML + override val testsToIgnore = setOf( + "S3DefaultAddressing", + "S3VirtualHostAddressing", + "S3PathAddressing", + "S3VirtualHostDualstackAddressing", + "S3VirtualHostAccelerateAddressing", + "S3VirtualHostDualstackAccelerateAddressing", + "S3OperationAddressingPreferred", + "S3EscapeObjectKeyInUriLabel", + "S3EscapePathObjectKeyInUriLabel", + "SDKAppliedContentEncoding_restXml", + "SDKAppendedGzipAfterProvidedEncoding_restXml" + ) override fun renderStructEncode( ctx: ProtocolGenerator.GenerationContext, @@ -64,28 +77,4 @@ class RestXmlProtocolGenerator : AWSHttpBindingProtocolGenerator() { val decoder = RestXmlStructDecodeXMLGenerator(ctx, members, shapeMetadata, writer, defaultTimestampFormat) decoder.render() } - - override fun generateProtocolUnitTests(ctx: ProtocolGenerator.GenerationContext): Int { - val testsToIgnore = setOf( - "S3DefaultAddressing", - "S3VirtualHostAddressing", - "S3PathAddressing", - "S3VirtualHostDualstackAddressing", - "S3VirtualHostAccelerateAddressing", - "S3VirtualHostDualstackAccelerateAddressing", - "S3OperationAddressingPreferred" - ) - return HttpProtocolTestGenerator( - ctx, - requestTestBuilder, - responseTestBuilder, - errorTestBuilder, - httpProtocolCustomizable, - operationMiddleware, - getProtocolHttpBindingResolver(ctx, defaultContentType), - serdeContext, - listOf(), - testsToIgnore - ).generateProtocolTests() + renderEndpointsTests(ctx) - } -} +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 10bd38938d7..220d9e4b3ab 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ kotlin.code.style=official # codegen -smithyVersion=1.30.0 +smithyVersion=1.37.0 smithyGradleVersion=0.6.0 smithySwiftVersion = 0.1.0