Sha256: c8aca6334afcc38c11d4e941b7cb507460e1af614d3a8392c4f4479b1cd4fcc7

Contents?: true

Size: 1.42 KB

Versions: 67

Compression:

Stored size: 1.42 KB

Contents

Shindo.tests('HP::Network | networking security group requests', ['hp', 'networking', 'securitygroup']) do

  @security_group_format = {
    'id'                    => String,
    'name'                  => String,
    'description'           => String,
    'tenant_id'             => String,
    'security_group_rules'  => [Hash]
  }

  tests('success') do

    @sec_group_id = nil

    tests("#create_security_group('fog_security_group', 'tests group')").formats(@security_group_format) do
      attributes = {:name => 'fog_security_group', :description => 'tests group'}
      data = HP[:network].create_security_group(attributes).body['security_group']
      @sec_group_id = data['id']
      data
    end

    tests("#get_security_group('#{@sec_group_id}')").formats(@security_group_format) do
      HP[:network].get_security_group(@sec_group_id).body['security_group']
    end

    tests("#list_security_groups").formats('security_groups' => [@security_group_format]) do
      HP[:network].list_security_groups.body
    end

    tests("#delete_security_group('#{@sec_group_id}')").succeeds do
      HP[:network].delete_security_group(@sec_group_id)
    end

  end

  tests('failure') do

    tests("#get_security_group(0)").raises(Fog::HP::Network::NotFound) do
      HP[:network].get_security_group(0)
    end

    tests("#delete_security_group(0)").raises(Fog::HP::Network::NotFound) do
      HP[:network].delete_security_group(0)
    end

  end

end

Version data entries

67 entries across 67 versions & 5 rubygems

Version Path
fog-1.38.0 tests/hp/requests/network/security_group_tests.rb
fog-1.37.0 tests/hp/requests/network/security_group_tests.rb
fog-1.36.0 tests/hp/requests/network/security_group_tests.rb
fog-1.35.0 tests/hp/requests/network/security_group_tests.rb
fog-2.0.0.pre.0 tests/hp/requests/network/security_group_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/tests/hp/requests/network/security_group_tests.rb
fog-1.34.0 tests/hp/requests/network/security_group_tests.rb
fog-1.33.0 tests/hp/requests/network/security_group_tests.rb
fog-1.32.0 tests/hp/requests/network/security_group_tests.rb
fog-1.31.0 tests/hp/requests/network/security_group_tests.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/hp/requests/network/security_group_tests.rb
fog-1.30.0 tests/hp/requests/network/security_group_tests.rb
fog-1.29.0 tests/hp/requests/network/security_group_tests.rb
fog-1.28.0 tests/hp/requests/network/security_group_tests.rb
fog-1.27.0 tests/hp/requests/network/security_group_tests.rb
fog-1.26.0 tests/hp/requests/network/security_group_tests.rb
fog-1.25.0 tests/hp/requests/network/security_group_tests.rb
nsidc-fog-1.24.1 tests/hp/requests/network/security_group_tests.rb
fog-1.24.0 tests/hp/requests/network/security_group_tests.rb
ns-fog-1.22.11 tests/hp/requests/network/security_group_tests.rb