-
Notifications
You must be signed in to change notification settings - Fork 863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Legacy Enums #3235
Remove Legacy Enums #3235
Conversation
@@ -19,15 +19,16 @@ public class EndpointResolverTests | |||
private const string AwsStsRegionalEndpointsEnvironmentVariable = "AWS_STS_REGIONAL_ENDPOINTS"; | |||
private const string DefaultStsEndpoint = @"https://sts.amazonaws.com/"; | |||
|
|||
[TestMethod][TestCategory("UnitTest")] | |||
[TestMethod] | |||
[TestCategory("UnitTest")] | |||
[TestCategory("Runtime")] | |||
public void TestSuccessfulCall() | |||
{ | |||
var endpointResolver = new EndpointResolver(); | |||
var executionContext = CreateExecutionContext(SetupConfig()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The config
returned by the setup method now uses the Standard
mode, so the determined endpoints have changed.
@@ -16,14 +16,14 @@ | |||
using Amazon.Runtime; | |||
using Amazon; | |||
using Moq; | |||
using Xunit; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class was using xUnit, but the project is configured for MSTest so I think the tests weren't running... I updated it to match the other custom tests.
@@ -720,33 +711,6 @@ protected ClientConfig(IDefaultConfigurationProvider defaultConfigurationProvide | |||
Initialize(); | |||
} | |||
|
|||
public ClientConfig() : this(new LegacyOnlyDefaultConfigurationProvider()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This constructor was not used by the service clients; I did have to modify one test to pass in a mocked provider.
EnrichLegacyMode(parsedModel); | ||
|
||
|
||
var validModes = parsedModel.Modes.Where(m => m.Name.ToPascalCase() != "Legacy").ToList(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we should add this part, maybe we will need to add a new mode named Legacy
in the future for any reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's unlikely, Legacy
is already one of the modes (https://docs.aws.amazon.com/sdkref/latest/guide/feature-smart-config-defaults.html), if a new one is added in the future we'd have to pick a new name.
Either way, it'd require us to update generator/ServiceClientGeneratorLib/DefaultConfiguration/DefaultConfigurationModel.cs
as well.
Description
Removes the
RequestRetryMode.Legacy
andDefaultConfigurationMode.Legacy
enum values; in V4, the .NET SDK will default toStandard
.There are 2 commits in this PR:
DefaultConfiguration
class for all services: 4f56a07Testing
AWSSDK.CoreAndCustomUnitTests.NetFramework.sln
andAWSSDK.NetFramework.sln
solutionsv4
branch as well:RetryForHttpStatus200WithErrorResponse
LongerTokenCaseAsync
MinimalBearerAuthCaseAsync
SingerShouldOverrideExistingHeaderAsync
License