spec/unit/microbosh_providers/aws_spec.rb in bosh-bootstrap-0.16.2 vs spec/unit/microbosh_providers/aws_spec.rb in bosh-bootstrap-0.17.0

- old
+ new

@@ -205,7 +205,30 @@ subject.create_microbosh_yml(settings) expect(File).to be_exists(microbosh_yml) yaml_files_match(microbosh_yml, spec_asset("microbosh_yml/micro_bosh.aws_vpc_recursor.yml")) end + + it "adds proxy if present" do + setting "provider.name", "aws" + setting "provider.region", "us-west-2" + setting "provider.credentials.aws_access_key_id", "ACCESS" + setting "provider.credentials.aws_secret_access_key", "SECRET" + setting "address.ip", "1.2.3.4" + setting "address.vpc_id", "vpc-123456" + setting "address.subnet_id", "subnet-123456" + setting "key_pair.path", "~/.microbosh/ssh/test-bosh" + setting "bosh.name", "test-bosh" + setting "bosh.salted_password", "salted_password" + setting "bosh.persistent_disk", 32768 + setting "proxy.http_proxy", "http://192.168.1.100:8080" + setting "proxy.https_proxy", "https://192.168.1.100:8080" + + + subject = Bosh::Bootstrap::MicroboshProviders::AWS.new(microbosh_yml, settings, fog_compute) + + subject.create_microbosh_yml(settings) + expect(File).to be_exists(microbosh_yml) + yaml_files_match(microbosh_yml, spec_asset("microbosh_yml/micro_bosh.aws_vpc_proxy.yml")) + end end end