Skip to content

Commit

Permalink
Remove json tests (tested in other ways) and minor touch ups
Browse files Browse the repository at this point in the history
  • Loading branch information
mullermp committed Oct 24, 2023
1 parent d672281 commit f321f6a
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 172 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ def initialize(options)

# @return [Array<EndpointParameter>]
attr_reader :parameters

def has_endpoint_built_in?
parameters.any? { |p| p.param_data['builtIn'] == 'SDK::Endpoint' }
end
end

class EndpointParameter
Expand Down Expand Up @@ -153,7 +149,7 @@ def built_in_client_context_param_value(param_data)
when 'AWS::S3::DisableMultiRegionAccessPoints'
'context.config.s3_disable_multiregion_access_points'
when 'SDK::Endpoint'
'endpoint'
'context.config.regional_endpoint ? nil : context.config.endpoint.to_s'
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ module {{module_name}}
{{#endpoint_classes}}
class {{name}}
def self.build(context)
{{#has_endpoint_built_in?}}
unless context.config.regional_endpoint
endpoint = context.config.endpoint.to_s
end
{{/has_endpoint_built_in?}}
{{module_name}}::EndpointParameters.new(
{{#parameters}}
{{#static_string?}}
Expand Down
2 changes: 1 addition & 1 deletion gems/aws-sdk-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Unreleased Changes
------------------

* Feature - Support Credential scoping using `ENV['AWS_CREDENTIAL_SCOPE']`, `aws_credential_scope` shared config, or the `credential_scope` Client configuration option.
* Feature - Support Credential scoped credentials using `ENV['AWS_CREDENTIAL_SCOPE']`, `aws_credential_scope` shared config, or the `credential_scope` Client configuration option.

3.185.1 (2023-10-05)
------------------
Expand Down
62 changes: 0 additions & 62 deletions gems/aws-sdk-core/spec/aws/credential_scope_spec.rb

This file was deleted.

99 changes: 0 additions & 99 deletions gems/aws-sdk-core/spec/aws/credential_scope_tests.json

This file was deleted.

1 change: 1 addition & 0 deletions gems/aws-sdk-core/spec/aws/shared_credentials_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module Aws
expect(creds.access_key_id).to eq('ACCESS_KEY_0')
expect(creds.secret_access_key).to eq('SECRET_KEY_0')
expect(creds.session_token).to eq('TOKEN_0')
expect(creds.credential_scope).to eq('SCOPE_0')
end

it 'supports fetching profiles from ENV' do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
aws_access_key_id = ACCESS_KEY_0
aws_secret_access_key = SECRET_KEY_0
aws_session_token = TOKEN_0
aws_credential_scope = SCOPE_0

[fooprofile]
aws_access_key_id = ACCESS_KEY_1
Expand Down

0 comments on commit f321f6a

Please sign in to comment.