Skip to content

Commit

Permalink
fix(storage-test): use identity comparison operators not XCTest metho…
Browse files Browse the repository at this point in the history
…ds (#3278)
  • Loading branch information
atierian committed Oct 5, 2023
1 parent ba2247b commit 937de0c
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ final class S3ClientConfigurationAccelerateTestCase: XCTestCase {
/// When: An override is set through `withAccelerate(_:)`
/// Then: The base configuration is not mutated.
func testPropertyOverrides() async throws {
let baseConfiguration = try await S3Client.S3ClientConfiguration()
baseConfiguration.serviceSpecific.accelerate = true

let baseConfiguration = try await configuration(accelerate: true)
let sut = try baseConfiguration.withAccelerate(false)
XCTAssertEqual(sut.serviceSpecific.accelerate, false)
XCTAssertEqual(baseConfiguration.serviceSpecific.accelerate, true)
Expand All @@ -35,7 +33,7 @@ final class S3ClientConfigurationAccelerateTestCase: XCTestCase {
let baseConfiguration = try await configuration(accelerate: baseAccelerate)

let nilAccelerate = try baseConfiguration.withAccelerate(nil)
XCTAssertIdentical(baseConfiguration, nilAccelerate)
XCTAssert(baseConfiguration === nilAccelerate)
}

/// Given: A client configuration.
Expand All @@ -46,7 +44,7 @@ final class S3ClientConfigurationAccelerateTestCase: XCTestCase {
let baseConfiguration = try await configuration(accelerate: baseAccelerate)

let equalAccelerate = try baseConfiguration.withAccelerate(baseAccelerate)
XCTAssertIdentical(baseConfiguration, equalAccelerate)
XCTAssert(baseConfiguration === equalAccelerate)
}

/// Given: A client configuration.
Expand All @@ -57,7 +55,7 @@ final class S3ClientConfigurationAccelerateTestCase: XCTestCase {
let baseConfiguration = try await configuration(accelerate: baseAccelerate)

let nonEqualAccelerate = try baseConfiguration.withAccelerate(!baseAccelerate)
XCTAssertNotIdentical(baseConfiguration, nonEqualAccelerate)
XCTAssert(baseConfiguration !== nonEqualAccelerate)
}


Expand All @@ -74,7 +72,7 @@ final class S3ClientConfigurationAccelerateTestCase: XCTestCase {
credentialsProvider: nil,
endpoint: UUID().uuidString,
serviceSpecific: serviceSpecific,
region: nil,
region: "us-east-1",
regionResolver: nil,
signingRegion: UUID().uuidString,
useDualStack: .random(),
Expand Down

0 comments on commit 937de0c

Please sign in to comment.