Sha256: dc433307ea3be29521fc7bfdf9852fcc2dbc64b4bee877d694c5c2009228230c

Contents?: true

Size: 1.69 KB

Versions: 64

Compression:

Stored size: 1.69 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

64 entries across 64 versions & 5 rubygems

Version Path
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-1.33.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-1.32.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-1.31.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-1.30.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-1.29.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-1.28.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-1.27.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-1.26.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-1.25.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
nsidc-fog-1.24.1 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-1.24.0 tests/brightbox/requests/compute/firewall_policy_tests.rb
ns-fog-1.22.11 tests/brightbox/requests/compute/firewall_policy_tests.rb
ns-fog-1.22.10 tests/brightbox/requests/compute/firewall_policy_tests.rb
ns-fog-1.22.9 tests/brightbox/requests/compute/firewall_policy_tests.rb
ns-fog-1.22.8 tests/brightbox/requests/compute/firewall_policy_tests.rb
ns-fog-1.22.7 tests/brightbox/requests/compute/firewall_policy_tests.rb
ns-fog-1.22.6 tests/brightbox/requests/compute/firewall_policy_tests.rb
fog-1.23.0 tests/brightbox/requests/compute/firewall_policy_tests.rb