diff --git a/test/codegen-generated-classes-test/src/main/resources/codegen-resources/endpointdiscovery/customization.config b/test/codegen-generated-classes-test/src/main/resources/codegen-resources/endpointdiscovery/customization.config index 1b02b0cb4f5c..b5c73436bb3f 100644 --- a/test/codegen-generated-classes-test/src/main/resources/codegen-resources/endpointdiscovery/customization.config +++ b/test/codegen-generated-classes-test/src/main/resources/codegen-resources/endpointdiscovery/customization.config @@ -1,4 +1,3 @@ { - "skipEndpointTestGeneration": true, - "useSraAuth": true + "skipEndpointTestGeneration": true } \ No newline at end of file diff --git a/test/codegen-generated-classes-test/src/main/resources/codegen-resources/endpointproviders/customization.config b/test/codegen-generated-classes-test/src/main/resources/codegen-resources/endpointproviders/customization.config index 2533170ba7bd..ec7c8d355d50 100644 --- a/test/codegen-generated-classes-test/src/main/resources/codegen-resources/endpointproviders/customization.config +++ b/test/codegen-generated-classes-test/src/main/resources/codegen-resources/endpointproviders/customization.config @@ -1,4 +1,3 @@ { - "skipEndpointTestGeneration": true, - "useSraAuth": true + "skipEndpointTestGeneration": true } diff --git a/test/codegen-generated-classes-test/src/test/java/software/amazon/awssdk/services/endpointproviders/EndpointInterceptorTests.java b/test/codegen-generated-classes-test/src/test/java/software/amazon/awssdk/services/endpointproviders/EndpointInterceptorTests.java index 987997dd3c2b..6ca37d6d3f73 100644 --- a/test/codegen-generated-classes-test/src/test/java/software/amazon/awssdk/services/endpointproviders/EndpointInterceptorTests.java +++ b/test/codegen-generated-classes-test/src/test/java/software/amazon/awssdk/services/endpointproviders/EndpointInterceptorTests.java @@ -15,33 +15,20 @@ package software.amazon.awssdk.services.endpointproviders; -import static java.util.Collections.emptyList; -import static java.util.Collections.singletonList; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import java.util.ArrayList; -import java.util.List; import java.util.concurrent.CompletableFuture; import org.junit.Test; import software.amazon.awssdk.auth.credentials.AwsBasicCredentials; import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider; -import software.amazon.awssdk.auth.signer.AwsSignerExecutionAttribute; -import software.amazon.awssdk.awscore.endpoints.AwsEndpointAttribute; -import software.amazon.awssdk.awscore.endpoints.authscheme.EndpointAuthScheme; -import software.amazon.awssdk.awscore.endpoints.authscheme.SigV4AuthScheme; -import software.amazon.awssdk.awscore.endpoints.authscheme.SigV4aAuthScheme; import software.amazon.awssdk.core.client.config.SdkAdvancedClientOption; import software.amazon.awssdk.core.interceptor.Context; import software.amazon.awssdk.core.interceptor.ExecutionAttributes; import software.amazon.awssdk.core.interceptor.ExecutionInterceptor; import software.amazon.awssdk.core.interceptor.SdkInternalExecutionAttribute; import software.amazon.awssdk.endpoints.Endpoint; -import software.amazon.awssdk.http.auth.aws.signer.AwsV4HttpSigner; -import software.amazon.awssdk.http.auth.aws.signer.AwsV4aHttpSigner; -import software.amazon.awssdk.http.auth.aws.signer.RegionSet; import software.amazon.awssdk.http.auth.spi.scheme.AuthScheme; -import software.amazon.awssdk.http.auth.spi.scheme.AuthSchemeOption; import software.amazon.awssdk.http.auth.spi.signer.AsyncSignRequest; import software.amazon.awssdk.http.auth.spi.signer.AsyncSignedRequest; import software.amazon.awssdk.http.auth.spi.signer.BaseSignRequest; @@ -52,7 +39,6 @@ import software.amazon.awssdk.identity.spi.IdentityProvider; import software.amazon.awssdk.identity.spi.IdentityProviders; import software.amazon.awssdk.regions.Region; -import software.amazon.awssdk.regions.RegionScope; import software.amazon.awssdk.services.restjsonendpointproviders.RestJsonEndpointProvidersAsyncClient; import software.amazon.awssdk.services.restjsonendpointproviders.RestJsonEndpointProvidersAsyncClientBuilder; import software.amazon.awssdk.services.restjsonendpointproviders.RestJsonEndpointProvidersClient; @@ -201,6 +187,8 @@ public void async_endpointProviderReturnsHeaders_appendedToExistingRequest() { assertThat(interceptor.context.httpRequest().matchingHeaders("TestHeader")).containsExactly("TestValue", "TestValue0"); } + // TODO(sra-identity-auth): Enable for useSraAuth=true + /* @Test public void sync_endpointProviderReturnsSignerProperties_overridesV4AuthSchemeResolverProperties() { RestJsonEndpointProvidersEndpointProvider defaultEndpointProvider = @@ -464,6 +452,7 @@ public void sync_endpointProviderReturnsV4aSignerProperties_executionAttributesF assertThat(interceptor.executionAttributes.getAttribute(AwsSignerExecutionAttribute.SERVICE_SIGNING_NAME)).isEqualTo("name-from-ep"); assertThat(interceptor.executionAttributes.getAttribute(AwsSignerExecutionAttribute.SIGNER_DOUBLE_URL_ENCODE)).isEqualTo(true); } + */ private static AuthScheme authScheme(String schemeId, HttpSigner signer) { return new AuthScheme() { @@ -524,8 +513,6 @@ public static class CaptureCompletedException extends RuntimeException { } private RestJsonEndpointProvidersClientBuilder syncClientBuilder() { - // TODO(sra-identity-auth): The service is currently using useSraAuth=true. - // Need to have tests for useSraAuth=false that work too - needs codegen changes I think. return RestJsonEndpointProvidersClient.builder() .region(Region.US_WEST_2) .credentialsProvider(