Sha256: 5e240524d6463eb76273c9381f5b23657eae8a1a4135027f9eaba461566bc005

Contents?: true

Size: 971 Bytes

Versions: 10

Compression:

Stored size: 971 Bytes

Contents

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

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

  let(:provider_client) { instance_double("Cyoi::Providers::Clients::OpenStackProviderClient") }
  subject { Bosh::Bootstrap::NetworkProviders::OpenStack.new(provider_client) }

  it "is registered" do
    expect(Bosh::Bootstrap::NetworkProviders.provider_class("openstack")).to eq subject.class
  end

  it "creates security groups it needs" do
    expected_groups = [
      ["ssh", "ssh", 22],
      ["dns-server", "dns-server", { protocol: "udp", ports: (53..53) }],
      ["bosh", "bosh", [4222, 6868, 25250, 25555, 25777]]
    ]
    expected_groups.each do |security_group_name, description, ports|
      expect(provider_client).to receive(:create_security_group).with(security_group_name, description, ports)
    end
    subject.perform(settings)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
bosh-bootstrap-0.18.1 spec/unit/network_providers/openstack_spec.rb
bosh-bootstrap-0.18.0 spec/unit/network_providers/openstack_spec.rb
bosh-bootstrap-0.17.1 spec/unit/network_providers/openstack_spec.rb
bosh-bootstrap-0.17.0 spec/unit/network_providers/openstack_spec.rb
bosh-bootstrap-0.16.2 spec/unit/network_providers/openstack_spec.rb
bosh-bootstrap-0.16.1 spec/unit/network_providers/openstack_spec.rb
bosh-bootstrap-0.16.0 spec/unit/network_providers/openstack_spec.rb
bosh-bootstrap-0.15.0 spec/unit/network_providers/openstack_spec.rb
bosh-bootstrap-0.14.5 spec/unit/network_providers/openstack_spec.rb
bosh-bootstrap-0.14.4 spec/unit/network_providers/openstack_spec.rb