Sha256: 8e1f81e8ff85f87377cca76542e5e35193fdc03bf000606b216b75a67f3a2abf

Contents?: true

Size: 1.17 KB

Versions: 19

Compression:

Stored size: 1.17 KB

Contents

Shindo.tests("Fog::Compute[:aws] | security_group", ['aws']) do

  model_tests(Fog::Compute[:aws].security_groups, {:description => 'foggroupdescription', :name => 'foggroupname'}, true)

  tests("authorize and revoke helpers") do
    @group = Fog::Compute[:aws].security_groups.create(:name => "foggroup", :description => "fog group desc")

    @other_group = Fog::Compute[:aws].security_groups.create(:name => 'fog other group', :description => 'another fog group')

    test("authorize access by another security group") do
      @group.authorize_group_and_owner(@other_group.name)
      @group.reload
      @group.ip_permissions.size == 3
    end

    test("revoke access from another security group") do
      @group.revoke_group_and_owner(@other_group.name)
      @group.reload
      @group.ip_permissions.empty?
    end

    test("authorize access to a port range") do
      @group.authorize_port_range(5000..6000)
      @group.reload
      @group.ip_permissions.size == 1
    end

    test("revoke access to a port range") do
      @group.revoke_port_range(5000..6000)
      @group.reload
      @group.ip_permissions.empty?
    end

    @other_group.destroy
    @group.destroy
  end
end

Version data entries

19 entries across 19 versions & 6 rubygems

Version Path
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/tests/aws/models/compute/security_group_tests.rb
michiels-fog-1.3.1 tests/aws/models/compute/security_group_tests.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/tests/aws/models/compute/security_group_tests.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/tests/aws/models/compute/security_group_tests.rb
fog-1.3.1 tests/aws/models/compute/security_group_tests.rb
fog-1.3.0 tests/aws/models/compute/security_group_tests.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/tests/aws/models/compute/security_group_tests.rb
fog-1.2.0 tests/aws/models/compute/security_group_tests.rb
ktheory-fog-1.1.2 tests/aws/models/compute/security_group_tests.rb
brightbox-cli-0.17.4 lib/brightbox-cli/vendor/fog/tests/aws/models/compute/security_group_tests.rb
brightbox-cli-0.17.3 lib/brightbox-cli/vendor/fog/tests/aws/models/compute/security_group_tests.rb
brightbox-cli-0.17.2 lib/brightbox-cli/vendor/fog/tests/aws/models/compute/security_group_tests.rb
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/fog/tests/aws/models/compute/security_group_tests.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/fog/tests/aws/models/compute/security_group_tests.rb
fog-1.1.2 tests/aws/models/compute/security_group_tests.rb
fog_tractical-1.1.4 tests/aws/models/compute/security_group_tests.rb
fog_tractical-1.1.3 tests/aws/models/compute/security_group_tests.rb
fog-1.1.1 tests/aws/models/compute/security_group_tests.rb
fog-1.1.0 tests/aws/models/compute/security_group_tests.rb