diff --git a/IntegrationTests/Package.swift b/IntegrationTests/Package.swift index 22e82b5fafe..9df93287589 100644 --- a/IntegrationTests/Package.swift +++ b/IntegrationTests/Package.swift @@ -41,6 +41,8 @@ let package = Package( dependencies: [ .package(path: "../../smithy-swift"), .package(path: "../../aws-sdk-swift"), + .package(url: "https://github.com/smithy-lang/smithy-swift-opentelemetry.git", from: "1.0.0"), + .package(url: "https://github.com/open-telemetry/opentelemetry-swift.git", from: "1.13.0"), ], targets: integrationTestTargets ) @@ -71,6 +73,7 @@ private func integrationTestTarget(_ name: String) -> Target { let integrationTestName = "\(name)IntegrationTests" var additionalDependencies: [String] = [] var exclusions: [String] = [] + var platformSpecificDependencies: [Target.Dependency] = [] switch name { case "AWSEC2": additionalDependencies = ["AWSIAM", "AWSSTS", "AWSCloudWatchLogs"] @@ -93,6 +96,10 @@ private func integrationTestTarget(_ name: String) -> Target { additionalDependencies = ["AWSCloudFront"] case "AWSSTS": additionalDependencies = ["AWSIAM", "AWSCognitoIdentity"] + platformSpecificDependencies = [ + .product(name: "SmithyOpenTelemetry", package: "smithy-swift-opentelemetry", condition: .when(platforms: [.macOS, .iOS, .tvOS, .watchOS])), + .product(name: "InMemoryExporter", package: "opentelemetry-swift", condition: .when(platforms: [.macOS, .iOS, .tvOS, .watchOS])) + ] case "AWSCognitoIdentity": additionalDependencies = ["AWSSTS", "AWSIAM"] default: @@ -113,7 +120,7 @@ private func integrationTestTarget(_ name: String) -> Target { .product(name: name, package: "aws-sdk-swift") ] + additionalDependencies.map { Target.Dependency.product(name: $0, package: "aws-sdk-swift", condition: nil) - }, + } + platformSpecificDependencies, path: "./Services/\(integrationTestName)", exclude: exclusions, resources: [.process("Resources")] diff --git a/IntegrationTests/Services/AWSSTSIntegrationTests/STSAssumeRoleAWSCredentialIdentityResolverTests.swift b/IntegrationTests/Services/AWSSTSIntegrationTests/STSAssumeRoleAWSCredentialIdentityResolverTests.swift index 91635c236b7..f562f8ac509 100644 --- a/IntegrationTests/Services/AWSSTSIntegrationTests/STSAssumeRoleAWSCredentialIdentityResolverTests.swift +++ b/IntegrationTests/Services/AWSSTSIntegrationTests/STSAssumeRoleAWSCredentialIdentityResolverTests.swift @@ -11,12 +11,10 @@ import AWSSTS import AWSIAM import AWSSDKIdentity import ClientRuntime -#if canImport(InMemoryExporter) +#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) +import SmithyOpenTelemetry import InMemoryExporter #endif -//#if os(Linux) -//import OpenTelemetryConcurrency -//#endif class STSAssumeRoleAWSCredentialIdentityResolverTests: XCTestCase { private let region = "us-east-1" diff --git a/README.md b/README.md index 785cab54b6c..e179dabe79a 100644 --- a/README.md +++ b/README.md @@ -45,4 +45,4 @@ This library is licensed under the Apache 2.0 License. ## Security -Please refer to our [security policy](https://github.com/awslabs/aws-sdk-swift/security/policy). \ No newline at end of file +Please refer to our [security policy](https://github.com/awslabs/aws-sdk-swift/security/policy).