Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update generated code #1604

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
120 changes: 1 addition & 119 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -228,46 +228,6 @@ func addServiceUnitTestTarget(_ name: String) {
]
}

func addIntegrationTestTarget(_ name: String) {
let integrationTestName = "\(name)IntegrationTests"
var additionalDependencies: [String] = []
var exclusions: [String] = []
switch name {
case "AWSEC2":
additionalDependencies = ["AWSIAM", "AWSSTS", "AWSCloudWatchLogs"]
exclusions = [
"Resources/IMDSIntegTestApp"
]
case "AWSECS":
additionalDependencies = ["AWSCloudWatchLogs", "AWSEC2", "AWSIAM", "AWSSTS"]
exclusions = [
"README.md",
"Resources/ECSIntegTestApp/"
]
case "AWSS3":
additionalDependencies = ["AWSSSOAdmin", "AWSS3Control", "AWSSTS"]
case "AWSEventBridge":
additionalDependencies = ["AWSRoute53"]
case "AWSCloudFrontKeyValueStore":
additionalDependencies = ["AWSCloudFront"]
case "AWSSTS":
additionalDependencies = ["AWSIAM", "AWSCognitoIdentity"]
default:
break
}
integrationTestServices.insert(name)
additionalDependencies.forEach { integrationTestServices.insert($0) }
package.targets += [
.testTarget(
name: integrationTestName,
dependencies: [.crt, .clientRuntime, .awsClientRuntime, .byName(name: name), .smithyTestUtils, .awsSDKIdentity, .smithyIdentity, .awsSDKCommon] + additionalDependencies.map { Target.Dependency.target(name: $0, condition: nil) },
path: "./IntegrationTests/Services/\(integrationTestName)",
exclude: exclusions,
resources: [.process("Resources")]
)
]
}

var enabledServices = Set<String>()
var enabledServiceUnitTests = Set<String>()

Expand All @@ -276,12 +236,6 @@ func addAllServices() {
enabledServiceUnitTests = Set(serviceTargets)
}

var integrationTestServices = Set<String>()

func addIntegrationTests() {
servicesWithIntegrationTests.forEach { addIntegrationTestTarget($0) }
}

func excludeRuntimeUnitTests() {
package.targets.removeAll {
$0.name == "AWSClientRuntimeTests" ||
Expand All @@ -291,60 +245,8 @@ func excludeRuntimeUnitTests() {
}
}

func addProtocolTests() {
struct ProtocolTest {
let name: String
let sourcePath: String
let testPath: String?
let buildOnly: Bool

init(name: String, sourcePath: String, testPath: String? = nil, buildOnly: Bool = false) {
self.name = name
self.sourcePath = sourcePath
self.testPath = testPath
self.buildOnly = buildOnly
}
}

let baseDir = "codegen/protocol-test-codegen/build/smithyprojections/protocol-test-codegen"
let baseDirLocal = "codegen/protocol-test-codegen-local/build/smithyprojections/protocol-test-codegen-local"

let protocolTests: [ProtocolTest] = [
.init(name: "AWSRestJsonTestSDK", sourcePath: "\(baseDir)/aws-restjson"),
.init(name: "AWSRestJsonValidationTestSDK", sourcePath: "\(baseDir)/aws-restjson-validation"),
.init(name: "AWSJson1_0TestSDK", sourcePath: "\(baseDir)/aws-json-10"),
.init(name: "AWSJson1_1TestSDK", sourcePath: "\(baseDir)/aws-json-11"),
.init(name: "RestXmlTestSDK", sourcePath: "\(baseDir)/rest-xml"),
.init(name: "RestXmlWithNamespaceTestSDK", sourcePath: "\(baseDir)/rest-xml-xmlns"),
.init(name: "Ec2QueryTestSDK", sourcePath: "\(baseDir)/ec2-query"),
.init(name: "AWSQueryTestSDK", sourcePath: "\(baseDir)/aws-query"),
.init(name: "APIGatewayTestSDK", sourcePath: "\(baseDir)/apigateway"),
.init(name: "GlacierTestSDK", sourcePath: "\(baseDir)/glacier"),
.init(name: "MachineLearningTestSDK", sourcePath: "\(baseDir)/machinelearning"),
.init(name: "S3TestSDK", sourcePath: "\(baseDir)/s3"),
.init(name: "rest_json_extras", sourcePath: "\(baseDirLocal)/rest_json_extras"),
.init(name: "AwsQueryExtras", sourcePath: "\(baseDirLocal)/AwsQueryExtras"),
.init(name: "EventStream", sourcePath: "\(baseDirLocal)/EventStream", buildOnly: true),
.init(name: "RPCEventStream", sourcePath: "\(baseDirLocal)/RPCEventStream", buildOnly: true),
.init(name: "Waiters", sourcePath: "\(baseDirLocal)/Waiters", testPath: "codegen/protocol-test-codegen-local/Tests"),
]
for protocolTest in protocolTests {
let target = Target.target(
name: protocolTest.name,
dependencies: serviceTargetDependencies,
path: "\(protocolTest.sourcePath)/swift-codegen/Sources/\(protocolTest.name)"
)
let testTarget = protocolTest.buildOnly ? nil : Target.testTarget(
name: "\(protocolTest.name)Tests",
dependencies: [.smithyTestUtils, .smithyStreams, .smithyWaitersAPI, .byNameItem(name: protocolTest.name, condition: nil)],
path: "\(protocolTest.testPath ?? protocolTest.sourcePath)/swift-codegen/Tests/\(protocolTest.name)Tests"
)
package.targets += [target, testTarget].compactMap { $0 }
}
}

func addResolvedTargets() {
enabledServices.union(integrationTestServices).forEach(addServiceTarget)
enabledServices.forEach(addServiceTarget)
enabledServiceUnitTests.forEach(addServiceUnitTestTarget)
}

Expand Down Expand Up @@ -749,25 +651,5 @@ let serviceTargets: [String] = [
// Uncomment this line to enable all services
addAllServices()

let servicesWithIntegrationTests: [String] = [
"AWSCloudFrontKeyValueStore",
"AWSEC2",
"AWSECS",
"AWSEventBridge",
"AWSKinesis",
"AWSMediaConvert",
"AWSRoute53",
"AWSS3",
"AWSSQS",
"AWSSTS",
"AWSTranscribeStreaming",
]

// Uncomment this line to enable integration tests
// addIntegrationTests()

// Uncomment this line to enable protocol tests
// addProtocolTests()

addResolvedTargets()

7 changes: 7 additions & 0 deletions Sources/Services/AWSACM/Sources/AWSACM/ACMClient.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

// Code generated by smithy-swift-codegen. DO NOT EDIT!

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

// Code generated by smithy-swift-codegen. DO NOT EDIT!

import class Smithy.Context
Expand Down
7 changes: 7 additions & 0 deletions Sources/Services/AWSACM/Sources/AWSACM/Endpoints.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

// Code generated by smithy-swift-codegen. DO NOT EDIT!

import class ClientRuntime.EndpointsRequestContext
Expand Down
7 changes: 7 additions & 0 deletions Sources/Services/AWSACM/Sources/AWSACM/Models.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

// Code generated by smithy-swift-codegen. DO NOT EDIT!

import Foundation
Expand Down
7 changes: 7 additions & 0 deletions Sources/Services/AWSACM/Sources/AWSACM/Paginators.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

// Code generated by smithy-swift-codegen. DO NOT EDIT!

import protocol ClientRuntime.PaginateToken
Expand Down
7 changes: 7 additions & 0 deletions Sources/Services/AWSACM/Sources/AWSACM/Plugins.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

// Code generated by smithy-swift-codegen. DO NOT EDIT!

import class AWSClientRuntime.AWSClientConfigDefaultsProvider
Expand Down
7 changes: 7 additions & 0 deletions Sources/Services/AWSACM/Sources/AWSACM/Waiters.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

// Code generated by smithy-swift-codegen. DO NOT EDIT!

import class SmithyWaitersAPI.Waiter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

// Code generated by smithy-swift-codegen. DO NOT EDIT!

@testable import AWSACM
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

// Code generated by smithy-swift-codegen. DO NOT EDIT!

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

// Code generated by smithy-swift-codegen. DO NOT EDIT!

import class Smithy.Context
Expand Down
7 changes: 7 additions & 0 deletions Sources/Services/AWSACMPCA/Sources/AWSACMPCA/Endpoints.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

// Code generated by smithy-swift-codegen. DO NOT EDIT!

import class ClientRuntime.EndpointsRequestContext
Expand Down
7 changes: 7 additions & 0 deletions Sources/Services/AWSACMPCA/Sources/AWSACMPCA/Models.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

// Code generated by smithy-swift-codegen. DO NOT EDIT!

import Foundation
Expand Down
7 changes: 7 additions & 0 deletions Sources/Services/AWSACMPCA/Sources/AWSACMPCA/Paginators.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

// Code generated by smithy-swift-codegen. DO NOT EDIT!

import protocol ClientRuntime.PaginateToken
Expand Down
7 changes: 7 additions & 0 deletions Sources/Services/AWSACMPCA/Sources/AWSACMPCA/Plugins.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

// Code generated by smithy-swift-codegen. DO NOT EDIT!

import class AWSClientRuntime.AWSClientConfigDefaultsProvider
Expand Down
7 changes: 7 additions & 0 deletions Sources/Services/AWSACMPCA/Sources/AWSACMPCA/Waiters.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

// Code generated by smithy-swift-codegen. DO NOT EDIT!

import class SmithyWaitersAPI.Waiter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

// Code generated by smithy-swift-codegen. DO NOT EDIT!

@testable import AWSACMPCA
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

// Code generated by smithy-swift-codegen. DO NOT EDIT!

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

// Code generated by smithy-swift-codegen. DO NOT EDIT!

import class Smithy.Context
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

// Code generated by smithy-swift-codegen. DO NOT EDIT!

import class ClientRuntime.EndpointsRequestContext
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

// Code generated by smithy-swift-codegen. DO NOT EDIT!

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

// Code generated by smithy-swift-codegen. DO NOT EDIT!

import protocol ClientRuntime.PaginateToken
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//

// Code generated by smithy-swift-codegen. DO NOT EDIT!

import class AWSClientRuntime.AWSClientConfigDefaultsProvider
Expand Down
Loading
Loading