# frozen_string_literal: true # WARNING ABOUT GENERATED CODE # # This file is generated. See the contributing guide for more information: # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md # # WARNING ABOUT GENERATED CODE require_relative 'spec_helper' module Aws::CodeStarconnections describe EndpointProvider do subject { Aws::CodeStarconnections::EndpointProvider.new } context 'For region ap-south-1 with FIPS enabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.ap-south-1.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ap-south-1", :use_dual_stack=>true, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ap-south-1 with FIPS enabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.ap-south-1.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ap-south-1", :use_dual_stack=>false, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ap-south-1 with FIPS disabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.ap-south-1.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ap-south-1", :use_dual_stack=>true, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ap-south-1 with FIPS disabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.ap-south-1.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ap-south-1", :use_dual_stack=>false, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ca-central-1 with FIPS enabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.ca-central-1.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ca-central-1", :use_dual_stack=>true, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ca-central-1 with FIPS enabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.ca-central-1.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ca-central-1", :use_dual_stack=>false, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ca-central-1 with FIPS disabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.ca-central-1.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ca-central-1", :use_dual_stack=>true, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ca-central-1 with FIPS disabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.ca-central-1.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ca-central-1", :use_dual_stack=>false, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region eu-central-1 with FIPS enabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.eu-central-1.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"eu-central-1", :use_dual_stack=>true, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region eu-central-1 with FIPS enabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.eu-central-1.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"eu-central-1", :use_dual_stack=>false, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region eu-central-1 with FIPS disabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.eu-central-1.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"eu-central-1", :use_dual_stack=>true, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region eu-central-1 with FIPS disabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.eu-central-1.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"eu-central-1", :use_dual_stack=>false, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region us-west-1 with FIPS enabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.us-west-1.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"us-west-1", :use_dual_stack=>true, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region us-west-1 with FIPS enabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.us-west-1.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"us-west-1", :use_dual_stack=>false, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region us-west-1 with FIPS disabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.us-west-1.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"us-west-1", :use_dual_stack=>true, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region us-west-1 with FIPS disabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.us-west-1.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"us-west-1", :use_dual_stack=>false, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region us-west-2 with FIPS enabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.us-west-2.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"us-west-2", :use_dual_stack=>true, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region us-west-2 with FIPS enabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.us-west-2.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"us-west-2", :use_dual_stack=>false, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region us-west-2 with FIPS disabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.us-west-2.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"us-west-2", :use_dual_stack=>true, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region us-west-2 with FIPS disabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.us-west-2.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"us-west-2", :use_dual_stack=>false, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region eu-north-1 with FIPS enabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.eu-north-1.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"eu-north-1", :use_dual_stack=>true, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region eu-north-1 with FIPS enabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.eu-north-1.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"eu-north-1", :use_dual_stack=>false, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region eu-north-1 with FIPS disabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.eu-north-1.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"eu-north-1", :use_dual_stack=>true, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region eu-north-1 with FIPS disabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.eu-north-1.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"eu-north-1", :use_dual_stack=>false, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region eu-west-3 with FIPS enabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.eu-west-3.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"eu-west-3", :use_dual_stack=>true, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region eu-west-3 with FIPS enabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.eu-west-3.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"eu-west-3", :use_dual_stack=>false, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region eu-west-3 with FIPS disabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.eu-west-3.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"eu-west-3", :use_dual_stack=>true, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region eu-west-3 with FIPS disabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.eu-west-3.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"eu-west-3", :use_dual_stack=>false, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region eu-west-2 with FIPS enabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.eu-west-2.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"eu-west-2", :use_dual_stack=>true, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region eu-west-2 with FIPS enabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.eu-west-2.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"eu-west-2", :use_dual_stack=>false, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region eu-west-2 with FIPS disabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.eu-west-2.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"eu-west-2", :use_dual_stack=>true, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region eu-west-2 with FIPS disabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.eu-west-2.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"eu-west-2", :use_dual_stack=>false, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region eu-west-1 with FIPS enabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.eu-west-1.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"eu-west-1", :use_dual_stack=>true, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region eu-west-1 with FIPS enabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.eu-west-1.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"eu-west-1", :use_dual_stack=>false, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region eu-west-1 with FIPS disabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.eu-west-1.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"eu-west-1", :use_dual_stack=>true, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region eu-west-1 with FIPS disabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.eu-west-1.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"eu-west-1", :use_dual_stack=>false, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ap-northeast-2 with FIPS enabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.ap-northeast-2.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ap-northeast-2", :use_dual_stack=>true, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ap-northeast-2 with FIPS enabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.ap-northeast-2.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ap-northeast-2", :use_dual_stack=>false, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ap-northeast-2 with FIPS disabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.ap-northeast-2.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ap-northeast-2", :use_dual_stack=>true, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ap-northeast-2 with FIPS disabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.ap-northeast-2.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ap-northeast-2", :use_dual_stack=>false, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ap-northeast-1 with FIPS enabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.ap-northeast-1.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ap-northeast-1", :use_dual_stack=>true, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ap-northeast-1 with FIPS enabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.ap-northeast-1.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ap-northeast-1", :use_dual_stack=>false, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ap-northeast-1 with FIPS disabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.ap-northeast-1.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ap-northeast-1", :use_dual_stack=>true, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ap-northeast-1 with FIPS disabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.ap-northeast-1.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ap-northeast-1", :use_dual_stack=>false, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region sa-east-1 with FIPS enabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.sa-east-1.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"sa-east-1", :use_dual_stack=>true, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region sa-east-1 with FIPS enabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.sa-east-1.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"sa-east-1", :use_dual_stack=>false, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region sa-east-1 with FIPS disabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.sa-east-1.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"sa-east-1", :use_dual_stack=>true, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region sa-east-1 with FIPS disabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.sa-east-1.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"sa-east-1", :use_dual_stack=>false, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ap-southeast-1 with FIPS enabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.ap-southeast-1.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ap-southeast-1", :use_dual_stack=>true, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ap-southeast-1 with FIPS enabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.ap-southeast-1.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ap-southeast-1", :use_dual_stack=>false, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ap-southeast-1 with FIPS disabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.ap-southeast-1.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ap-southeast-1", :use_dual_stack=>true, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ap-southeast-1 with FIPS disabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.ap-southeast-1.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ap-southeast-1", :use_dual_stack=>false, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ap-southeast-2 with FIPS enabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.ap-southeast-2.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ap-southeast-2", :use_dual_stack=>true, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ap-southeast-2 with FIPS enabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.ap-southeast-2.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ap-southeast-2", :use_dual_stack=>false, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ap-southeast-2 with FIPS disabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.ap-southeast-2.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ap-southeast-2", :use_dual_stack=>true, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region ap-southeast-2 with FIPS disabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.ap-southeast-2.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"ap-southeast-2", :use_dual_stack=>false, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region us-east-1 with FIPS enabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.us-east-1.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"us-east-1", :use_dual_stack=>true, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region us-east-1 with FIPS enabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.us-east-1.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"us-east-1", :use_dual_stack=>false, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region us-east-1 with FIPS disabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.us-east-1.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"us-east-1", :use_dual_stack=>true, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region us-east-1 with FIPS disabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.us-east-1.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"us-east-1", :use_dual_stack=>false, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region us-east-2 with FIPS enabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.us-east-2.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"us-east-2", :use_dual_stack=>true, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region us-east-2 with FIPS enabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections-fips.us-east-2.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"us-east-2", :use_dual_stack=>false, :use_fips=>true}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region us-east-2 with FIPS disabled and DualStack enabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.us-east-2.api.aws"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"us-east-2", :use_dual_stack=>true, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For region us-east-2 with FIPS disabled and DualStack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://codestar-connections.us-east-2.amazonaws.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"us-east-2", :use_dual_stack=>false, :use_fips=>false}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For custom endpoint with fips disabled and dualstack disabled' do let(:expected) do {"endpoint"=>{"url"=>"https://example.com"}} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"us-east-1", :use_dual_stack=>false, :use_fips=>false, :endpoint=>"https://example.com"}) endpoint = subject.resolve_endpoint(params) expect(endpoint.url).to eq(expected['endpoint']['url']) expect(endpoint.headers).to eq(expected['endpoint']['headers'] || {}) expect(endpoint.properties).to eq(expected['endpoint']['properties'] || {}) end end context 'For custom endpoint with fips enabled and dualstack disabled' do let(:expected) do {"error"=>"Invalid Configuration: FIPS and custom endpoint are not supported"} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"us-east-1", :use_dual_stack=>false, :use_fips=>true, :endpoint=>"https://example.com"}) expect do subject.resolve_endpoint(params) end.to raise_error(ArgumentError, expected['error']) end end context 'For custom endpoint with fips disabled and dualstack enabled' do let(:expected) do {"error"=>"Invalid Configuration: Dualstack and custom endpoint are not supported"} end it 'produces the expected output from the EndpointProvider' do params = EndpointParameters.new(**{:region=>"us-east-1", :use_dual_stack=>true, :use_fips=>false, :endpoint=>"https://example.com"}) expect do subject.resolve_endpoint(params) end.to raise_error(ArgumentError, expected['error']) end end end end