Skip to content

Commit

Permalink
chore: Use TestInitializer to initialize CRT (#1626)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbelkins authored Jul 11, 2024
1 parent 3f33b6f commit 331b2d4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func addServiceUnitTestTarget(_ name: String) {
package.targets += [
.testTarget(
name: "\(testName)",
dependencies: [.crt, .clientRuntime, .awsClientRuntime, .byName(name: name), .smithyTestUtils],
dependencies: [.clientRuntime, .awsClientRuntime, .byName(name: name), .smithyTestUtils],
path: "Sources/Services/\(name)/Tests/\(testName)"
)
]
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func addServiceUnitTestTarget(_ name: String) {
package.targets += [
.testTarget(
name: "\(testName)",
dependencies: [.crt, .clientRuntime, .awsClientRuntime, .byName(name: name), .smithyTestUtils],
dependencies: [.clientRuntime, .awsClientRuntime, .byName(name: name), .smithyTestUtils],
path: "Sources/Services/\(name)/Tests/\(testName)"
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import software.amazon.smithy.swift.codegen.SwiftDependency
import software.amazon.smithy.swift.codegen.SwiftWriter
import software.amazon.smithy.swift.codegen.endpoints.EndpointTypes
import software.amazon.smithy.swift.codegen.integration.ProtocolGenerator
import software.amazon.smithy.swift.codegen.swiftmodules.CRT
import software.amazon.smithy.swift.codegen.swiftmodules.ClientRuntimeTypes
import software.amazon.smithy.swift.codegen.swiftmodules.SmithyHTTPAPITypes
import software.amazon.smithy.swift.codegen.swiftmodules.SmithyTestUtilTypes
import software.amazon.smithy.swift.codegen.swiftmodules.XCTestTypes
import software.amazon.smithy.swift.codegen.utils.toLowerCamelCase

Expand All @@ -47,7 +47,7 @@ class EndpointTestGenerator(
writer.openBlock("class EndpointResolverTest: \$N {", "}", XCTestTypes.XCTestCase) {
writer.write("")
writer.openBlock("override class func setUp() {", "}") {
writer.write("\$N.initialize()", CRT.CommonRuntimeKit)
writer.write("\$N.initialize()", SmithyTestUtilTypes.TestInitializer)
}
writer.write("")

Expand Down

0 comments on commit 331b2d4

Please sign in to comment.