Sha256: d4c2503b48e9cc8f5b1514ae5f42ac71bdcdccb3d15736521b96f8b7b7d6c3e9

Contents?: true

Size: 1.68 KB

Versions: 20

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("#delete_firewall_policy('#{@firewall_policy_id}')") do
      result = Fog::Compute[:brightbox].delete_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

20 entries across 20 versions & 1 rubygems

Version Path
fog-brightbox-1.10.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-1.9.1 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-1.9.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-1.8.2 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-1.8.1 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-1.8.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-1.7.3 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-1.7.2 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-1.7.1 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-1.7.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-1.6.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-1.5.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-1.5.0.rc1 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-1.4.2 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-1.4.1 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-1.4.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-1.3.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-1.2.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-1.1.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-brightbox-1.0.0 tests/brightbox/requests/compute/firewall_policy_tests.rb