Sha256: 55f656bed15940ac454151344302ad4ec8d4d00d176e98ca19583bc6cfd244b8

Contents?: true

Size: 1.68 KB

Versions: 16

Compression:

Stored size: 1.68 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"]
      data_matches_schema(Brightbox::Compute::Formats::Full::FIREWALL_POLICY, :allow_extra_keys => true) { result }
    end

    tests("#list_firewall_policies()") do
      data_matches_schema(Brightbox::Compute::Formats::Collection::FIREWALL_POLICIES, :allow_extra_keys => true) do
        Fog::Compute[:brightbox].list_firewall_policies
      end
    end

    tests("#get_firewall_policy('#{@firewall_policy_id}')") do
      data_matches_schema(Brightbox::Compute::Formats::Full::FIREWALL_POLICY, :allow_extra_keys => true) 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)
      data_matches_schema(Brightbox::Compute::Formats::Full::FIREWALL_POLICY, :allow_extra_keys => true) { 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)
      data_matches_schema(Brightbox::Compute::Formats::Full::FIREWALL_POLICY, :allow_extra_keys => true) { result }
    end
  end
end

Version data entries

16 entries across 14 versions & 3 rubygems

Version Path
fog-brightbox-1.0.0.rc2 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-1.0.0.rc1 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-0.16.1 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-0.16.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-brightbox-0.15.0/tests/brightbox/requests/compute/firewall_policy_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-brightbox-0.15.0/tests/brightbox/requests/compute/firewall_policy_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-brightbox-0.15.0/tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-0.15.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-0.14.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-0.13.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-0.12.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-0.11.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-0.10.1 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-0.10.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-brightbox-0.9.0/tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-0.9.0 tests/brightbox/requests/compute/firewall_policy_tests.rb