From 21688005406f3caaec0fecbed91b769d35622363 Mon Sep 17 00:00:00 2001 From: Tianyi Wang Date: Wed, 17 May 2023 14:42:50 -0400 Subject: [PATCH] recover some deprecated func --- aws/config.go | 4 ++++ aws/config_test.go | 31 ++++++++++++++++--------------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/aws/config.go b/aws/config.go index 6ccd8ee2602..e325867e742 100644 --- a/aws/config.go +++ b/aws/config.go @@ -597,6 +597,10 @@ func mergeInConfig(dst *Config, other *Config) { dst.SleepDelay = other.SleepDelay } + if other.DisableRestProtocolURICleaning != nil { + dst.DisableRestProtocolURICleaning = other.DisableRestProtocolURICleaning + } + if other.EnforceShouldRetryCheck != nil { dst.EnforceShouldRetryCheck = other.EnforceShouldRetryCheck } diff --git a/aws/config_test.go b/aws/config_test.go index 8cbeecdc305..461e514905c 100644 --- a/aws/config_test.go +++ b/aws/config_test.go @@ -49,21 +49,22 @@ func TestCopyReturnsNewInstance(t *testing.T) { var mergeTestZeroValueConfig = Config{} var mergeTestConfig = Config{ - Credentials: testCredentials, - Endpoint: String("MergeTestEndpoint"), - Region: String("MERGE_TEST_AWS_REGION"), - DisableSSL: Bool(true), - HTTPClient: http.DefaultClient, - LogLevel: LogLevel(LogDebug), - Logger: NewDefaultLogger(), - MaxRetries: Int(10), - DisableParamValidation: Bool(true), - DisableComputeChecksums: Bool(true), - DisableEndpointHostPrefix: Bool(true), - EnableEndpointDiscovery: Bool(true), - EnforceShouldRetryCheck: Bool(true), - S3ForcePathStyle: Bool(true), - LowerCaseHeaderMaps: Bool(true), + Credentials: testCredentials, + Endpoint: String("MergeTestEndpoint"), + Region: String("MERGE_TEST_AWS_REGION"), + DisableSSL: Bool(true), + HTTPClient: http.DefaultClient, + LogLevel: LogLevel(LogDebug), + Logger: NewDefaultLogger(), + MaxRetries: Int(10), + DisableParamValidation: Bool(true), + DisableComputeChecksums: Bool(true), + DisableEndpointHostPrefix: Bool(true), + EnableEndpointDiscovery: Bool(true), + EnforceShouldRetryCheck: Bool(true), + DisableRestProtocolURICleaning: Bool(true), + S3ForcePathStyle: Bool(true), + LowerCaseHeaderMaps: Bool(true), } var mergeTests = []struct {