Sha256: 4cb39b8d671a4688e5b6fd6716ffec29b0ca69cd755799811d273b8814b17547

Contents?: true

Size: 1.04 KB

Versions: 4

Compression:

Stored size: 1.04 KB

Contents

require "readwritesettings"
require "fakeweb"
require "bosh-bootstrap/network_providers"
require "bosh-bootstrap/network_providers/aws"

describe Bosh::Bootstrap::NetworkProviders::AWS do
  include Bosh::Bootstrap::Cli::Helpers::Settings

  let(:provider_client) { stub() }
  subject { Bosh::Bootstrap::NetworkProviders::AWS.new(provider_client) }

  it "is registered" do
    Bosh::Bootstrap::NetworkProviders.provider_class("aws").should == subject.class
  end

  it "creates security groups it needs" do
    expected_groups = [
      ["ssh", "ssh", ports: 22],
      ["bosh_nats_server", "bosh_nats_server", ports: 4222],
      ["bosh_agent_http", "bosh_agent_http", ports: 6868],
      ["bosh_blobstore", "bosh_blobstore", ports: 25250],
      ["bosh_director", "bosh_director", ports: 25555],
      ["bosh_registry", "bosh_registry", ports: 25777],
    ]
    expected_groups.each do |security_group_name, description, ports|
      provider_client.stub(:create_security_group).with(security_group_name, description, ports)
    end
    subject.perform
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bosh-bootstrap-0.11.4 spec/unit/network_providers/aws_spec.rb
bosh-bootstrap-0.11.3 spec/unit/network_providers/aws_spec.rb
bosh-bootstrap-0.11.2 spec/unit/network_providers/aws_spec.rb
bosh-bootstrap-0.11.1 spec/unit/network_providers/aws_spec.rb