Sha256: 6c04407242a7e0d2dfe8e762da6a377f6a5381e3f2142c92b521728d359e691a

Contents?: true

Size: 1.06 KB

Versions: 8

Compression:

Stored size: 1.06 KB

Contents

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

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

  tests("a group with trailing whitespace") do
    @group = Fog::Compute[:aws].security_groups.create(:name => "foggroup with spaces   ", :description => "   fog group desc   ")
    test("name is correct") do
      @group.name ==  "foggroup with spaces   "
    end

    test("description is correct") do
      @group.description == "   fog group desc   "
    end

    @other_group = Fog::Compute[:aws].security_groups.create(:name => 'other group', :description => 'another 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

    @other_group.destroy
    @group.destroy
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
brightbox-cli-0.16.0 lib/brightbox-cli/vendor/fog/tests/aws/models/compute/security_group_tests.rb
brightbox-cli-0.15.0 lib/brightbox-cli/vendor/fog/tests/aws/models/compute/security_group_tests.rb
tag-fog-1.0.1 tests/aws/models/compute/security_group_tests.rb
brightbox-cli-0.14.1 lib/brightbox-cli/vendor/fog/tests/aws/models/compute/security_group_tests.rb
brightbox-cli-0.14.0 lib/brightbox-cli/vendor/fog/tests/aws/models/compute/security_group_tests.rb
fog-1.0.0 tests/aws/models/compute/security_group_tests.rb
brightbox-cli-0.13.1 lib/brightbox-cli/vendor/fog/tests/compute/models/aws/security_group_tests.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/tests/compute/models/aws/security_group_tests.rb