Skip to content

Commit

Permalink
Update initializer call in test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sichan Yoo committed Nov 9, 2024
1 parent 5eb46b3 commit a45ad36
Showing 1 changed file with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ class BusinessMetricsTests: XCTestCase {
let userAgent = AWSUserAgentMetadata.fromConfigAndContext(
serviceID: "test",
version: "1.0",
config: UserAgentValuesFromConfig(appID: nil, endpoint: nil, awsRetryMode: .standard),
config: UserAgentValuesFromConfig(
appID: nil,
endpoint: nil,
awsRetryMode: .standard,
requestChecksumCalculation: .whenRequired,
responseChecksumValidation: .whenRequired
),
context: context
)
// Assert values in context match with values assigned to user agent
Expand All @@ -50,11 +56,17 @@ class BusinessMetricsTests: XCTestCase {
let userAgent = AWSUserAgentMetadata.fromConfigAndContext(
serviceID: "test",
version: "1.0",
config: UserAgentValuesFromConfig(appID: nil, endpoint: "test-endpoint", awsRetryMode: .adaptive),
config: UserAgentValuesFromConfig(
appID: nil,
endpoint: "test-endpoint",
awsRetryMode: .adaptive,
requestChecksumCalculation: .whenSupported,
responseChecksumValidation: .whenSupported
),
context: context
)
// F comes from retry mode being adaptive & N comes from endpoint override
let expectedString = "m/A,B,F,N,S"
let expectedString = "m/A,B,F,N,S,Z,b"
XCTAssertEqual(userAgent.businessMetrics?.description, expectedString)
}
}

0 comments on commit a45ad36

Please sign in to comment.