Skip to content

Commit

Permalink
chore: update changes needed for the sdk updated
Browse files Browse the repository at this point in the history
  • Loading branch information
harsh62 committed Nov 22, 2024
1 parent 12575b7 commit 152882e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,19 @@ class MockEndPointResolver: EndpointResolver {
}

class MockLogAgent: LogAgent {
func log(
level: Smithy.LogAgentLevel,
message: @autoclosure () -> String,
metadata: @autoclosure () -> [String : String]?,
source: @autoclosure () -> String,
file: String,
function: String,
line: UInt
) {
print("MockLogAgent")
}

var name: String = ""

var level: LogAgentLevel = .debug

func log(level: LogAgentLevel, message: String, metadata: [String: String]?, source: String, file: String, function: String, line: UInt) {
print("MockLogAgent")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ private class MockLogAgent: LogAgent {
let name = "MockLogAgent"
var level: LogAgentLevel = .info

func log(level: LogAgentLevel, message: String, metadata: [String : String]?, source: String, file: String, function: String, line: UInt) {
func log(
level: Smithy.LogAgentLevel,
message: @autoclosure () -> String,
metadata: @autoclosure () -> [String : String]?,
source: @autoclosure () -> String,
file: String,
function: String,
line: UInt
) {
print("MockLogAgent")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ extension UploadPartInput {
builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:))
builder.applySigner(ClientRuntime.SignerMiddleware<UploadPartOutput>())
let endpointParams = EndpointParams(accelerate: config.accelerate ?? false, bucket: input.bucket, disableMultiRegionAccessPoints: config.disableMultiRegionAccessPoints ?? false, disableS3ExpressSessionAuth: config.disableS3ExpressSessionAuth, endpoint: config.endpoint, forcePathStyle: config.forcePathStyle ?? false, key: input.key, region: config.region, useArnRegion: config.useArnRegion, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false, useGlobalEndpoint: config.useGlobalEndpoint ?? false)
context.attributes.set(key: Smithy.AttributeKey<EndpointParams>(name: "EndpointParams"), value: endpointParams)
context.set(key: Smithy.AttributeKey<EndpointParams>(name: "EndpointParams"), value: endpointParams)
builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware<UploadPartOutput, EndpointParams>(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: $0) }, endpointParams: endpointParams))
builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware<UploadPartOutput>())
builder.interceptors.add(AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware<UploadPartInput, UploadPartOutput>())
Expand Down

0 comments on commit 152882e

Please sign in to comment.