Sha256: daed88249b380f32393efcb17d405b4cb058742fec0f83d825a24ac461920873

Contents?: true

Size: 1.43 KB

Versions: 25

Compression:

Stored size: 1.43 KB

Contents

Shindo.tests('Fog::Compute[:brightbox] | firewall rule requests', ['brightbox']) do

  tests('success') do
    pending if Fog.mocking?

    unless Fog.mocking?
      policy = Fog::Compute[:brightbox].firewall_policies.create
    end

    create_options = {
      :firewall_policy => policy.id,
      :destination => "127.0.0.1"
    }

    tests("#create_firewall_rule(#{create_options.inspect})") do
      result = Fog::Compute[:brightbox].create_firewall_rule(create_options)
      @firewall_rule_id = result["id"]
      formats(Brightbox::Compute::Formats::Full::FIREWALL_RULE, false) { result }
    end

    tests("#get_firewall_rule('#{@firewall_rule_id}')") do
      formats(Brightbox::Compute::Formats::Full::FIREWALL_RULE, false) do
        Fog::Compute[:brightbox].get_firewall_rule(@firewall_rule_id)
      end
    end

    update_options = {:source => nil, :destination => "127.0.0.1"}
    tests("#update_firewall_rule('#{@firewall_rule_id}', #{update_options.inspect})") do
      formats(Brightbox::Compute::Formats::Full::FIREWALL_RULE, false) do
        Fog::Compute[:brightbox].update_firewall_rule(@firewall_rule_id, update_options)
      end
    end

    tests("#destroy_firewall_rule('#{@firewall_rule_id}')") do
      result = Fog::Compute[:brightbox].destroy_firewall_rule(@firewall_rule_id)
      formats(Brightbox::Compute::Formats::Full::FIREWALL_RULE, false) { result }
    end

    unless Fog.mocking?
      policy.destroy
    end
  end
end

Version data entries

25 entries across 25 versions & 6 rubygems

Version Path
gapinc-fog-1.12.1.2.1 tests/brightbox/requests/compute/firewall_rule_tests.rb
fog-maestrodev-1.15.0.20130829165835 tests/brightbox/requests/compute/firewall_rule_tests.rb
fog-1.15.0 tests/brightbox/requests/compute/firewall_rule_tests.rb
gapinc-fog-1.14.0 tests/brightbox/requests/compute/firewall_rule_tests.rb
fog-maestrodev-1.14.0.20130806165225 tests/brightbox/requests/compute/firewall_rule_tests.rb
fog-1.14.0 tests/brightbox/requests/compute/firewall_rule_tests.rb
fog-1.13.0 tests/brightbox/requests/compute/firewall_rule_tests.rb
gapinc-fog-1.12.1.2 tests/brightbox/requests/compute/firewall_rule_tests.rb
gapinc-fog-1.12.1.1 tests/brightbox/requests/compute/firewall_rule_tests.rb
gapinc-fog-1.12.1a tests/brightbox/requests/compute/firewall_rule_tests.rb
gapinc-fog-1.12.1 tests/brightbox/requests/compute/firewall_rule_tests.rb
fog-1.12.1 tests/brightbox/requests/compute/firewall_rule_tests.rb
fog-1.12.0 tests/brightbox/requests/compute/firewall_rule_tests.rb
hpfog-0.0.20 tests/brightbox/requests/compute/firewall_rule_tests.rb
vagrant-shell-0.2.6 vendor/bundle/gems/fog-1.10.1/tests/brightbox/requests/compute/firewall_rule_tests.rb
vagrant-shell-0.2.5 vendor/bundle/gems/fog-1.10.1/tests/brightbox/requests/compute/firewall_rule_tests.rb
fog-1.11.1 tests/brightbox/requests/compute/firewall_rule_tests.rb
fog-1.11.0 tests/brightbox/requests/compute/firewall_rule_tests.rb
fog-1.10.1 tests/brightbox/requests/compute/firewall_rule_tests.rb
fog-test-me-1.10.0 tests/brightbox/requests/compute/firewall_rule_tests.rb