Sha256: 3cf8f8a0700b0f2cd7c415ff9cf1034fe69e3fb7edde5e013fe083b9f6ed6616

Contents?: true

Size: 1.65 KB

Versions: 40

Compression:

Stored size: 1.65 KB

Contents

Shindo.tests('Fog::Redshift[:aws] | cluster security group requests', ['aws']) do
  pending if Fog.mocking?
  suffix     = rand(65536).to_s(16) 
  identifier = "test-cluster-security-group-#{suffix}"

  @cluster_security_group_format = {
    "ClusterSecurityGroup"  => {
      "EC2SecurityGroups"        => Fog::Nullable::Array,             
      "IPRanges"                 => Fog::Nullable::Array,             
      "Description"              => String,
      "ClusterSecurityGroupName" => String
    }
  }

  @describe_cluster_security_groups_format = {
    "ClusterSecurityGroups" => [@cluster_security_group_format]
  }


  tests('success') do
    tests("create_cluster_security_group").formats(@cluster_security_group_format) do
      body = Fog::AWS[:redshift].create_cluster_security_group(:cluster_security_group_name => identifier, :description => 'testing').body
      body
    end


    tests("describe_cluster_security_groups").formats(@describe_cluster_security_groups_format) do
      body = Fog::AWS[:redshift].describe_cluster_security_groups.body
      body
    end

    tests("delete_cluster_security_group") do 
      present = !Fog::AWS[:redshift].describe_cluster_security_groups(:cluster_security_group_name => identifier).body['ClusterSecurityGroups'].empty?
      tests("verify presence before deletion").returns(true) { present }

      Fog::AWS[:redshift].delete_cluster_security_group(:cluster_security_group_name => identifier)

      not_present = Fog::AWS[:redshift].describe_cluster_security_groups(:cluster_security_group_name => identifier).body['ClusterSecurityGroups'].empty?
      tests("verify deletion").returns(true) { not_present }
    end

  end

end

Version data entries

40 entries across 40 versions & 2 rubygems

Version Path
fog-1.22.0 tests/aws/requests/redshift/cluster_security_group_tests.rb
fog-1.21.0 tests/aws/requests/redshift/cluster_security_group_tests.rb
fog-maestrodev-1.20.0.20140305101839 tests/aws/requests/redshift/cluster_security_group_tests.rb
fog-maestrodev-1.20.0.20140305101305 tests/aws/requests/redshift/cluster_security_group_tests.rb
fog-maestrodev-1.19.0.20140212012611 tests/aws/requests/redshift/cluster_security_group_tests.rb
fog-1.20.0 tests/aws/requests/redshift/cluster_security_group_tests.rb
fog-maestrodev-1.19.0.20140110004459 tests/aws/requests/redshift/cluster_security_group_tests.rb
fog-maestrodev-1.19.0.20140110003812 tests/aws/requests/redshift/cluster_security_group_tests.rb
fog-maestrodev-1.19.0.20140109202555 tests/aws/requests/redshift/cluster_security_group_tests.rb
fog-maestrodev-1.19.0.20140107192102 tests/aws/requests/redshift/cluster_security_group_tests.rb
fog-maestrodev-1.19.0.20140107142106 tests/aws/requests/redshift/cluster_security_group_tests.rb
fog-maestrodev-1.19.0.20131219203941 tests/aws/requests/redshift/cluster_security_group_tests.rb
fog-maestrodev-1.18.0.20131219193542 tests/aws/requests/redshift/cluster_security_group_tests.rb
fog-1.19.0 tests/aws/requests/redshift/cluster_security_group_tests.rb
fog-maestrodev-1.18.0.20131219033443 tests/aws/requests/redshift/cluster_security_group_tests.rb
fog-maestrodev-1.18.0.20131219032002 tests/aws/requests/redshift/cluster_security_group_tests.rb
fog-maestrodev-1.18.0.20131219030716 tests/aws/requests/redshift/cluster_security_group_tests.rb
fog-maestrodev-1.18.0.20131219022322 tests/aws/requests/redshift/cluster_security_group_tests.rb
fog-maestrodev-1.18.0.20131218202447 tests/aws/requests/redshift/cluster_security_group_tests.rb
fog-maestrodev-1.18.0.20131209091424 tests/aws/requests/redshift/cluster_security_group_tests.rb