Sha256: 0dfddb0d8314cf177c751be0c471663b2b03ca0163900327dd66cce31da3e722

Contents?: true

Size: 1.53 KB

Versions: 21

Compression:

Stored size: 1.53 KB

Contents

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

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

    create_options = {
      :name => "Fog test policy A"
    }

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

    tests("#list_firewall_policies()") do
      formats(Brightbox::Compute::Formats::Collection::FIREWALL_POLICIES, false) do
        Fog::Compute[:brightbox].list_firewall_policies
      end
    end

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

    update_options = {:name => "Fog test policy B"}
    tests("#update_firewall_policy('#{@firewall_policy_id}', #{update_options.inspect})") do
      result = Fog::Compute[:brightbox].update_firewall_policy(@firewall_policy_id, update_options)
      formats(Brightbox::Compute::Formats::Full::FIREWALL_POLICY, false) { result }
      returns("Fog test policy B") { result["name"] }
    end

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

Version data entries

21 entries across 21 versions & 6 rubygems

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