Sha256: 7ea1f1887526c39ef2da357d7d68cdbe045f3c55ffe6e9c2ba15b25b7d97224b

Contents?: true

Size: 1.63 KB

Versions: 79

Compression:

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

79 entries across 77 versions & 6 rubygems

Version Path
fog-aws-3.12.0 tests/requests/redshift/cluster_security_group_tests.rb
fog-aws-3.11.0 tests/requests/redshift/cluster_security_group_tests.rb
fog-aws-3.10.0 tests/requests/redshift/cluster_security_group_tests.rb
fog-aws-3.9.0 tests/requests/redshift/cluster_security_group_tests.rb
fog-aws-3.8.0 tests/requests/redshift/cluster_security_group_tests.rb
fog-aws-3.7.0 tests/requests/redshift/cluster_security_group_tests.rb
fog-aws-3.6.7 tests/requests/redshift/cluster_security_group_tests.rb
fog-aws-3.6.6 tests/requests/redshift/cluster_security_group_tests.rb
fog-aws-3.6.5 tests/requests/redshift/cluster_security_group_tests.rb
fog-aws-3.6.4 tests/requests/redshift/cluster_security_group_tests.rb
fog-aws-3.6.3 tests/requests/redshift/cluster_security_group_tests.rb
fog-aws-3.6.2 tests/requests/redshift/cluster_security_group_tests.rb
fog-aws-3.5.2 tests/requests/redshift/cluster_security_group_tests.rb
fog-aws-3.5.1 tests/requests/redshift/cluster_security_group_tests.rb
fog-aws-3.5.0 tests/requests/redshift/cluster_security_group_tests.rb
fog-aws-3.4.0 tests/requests/redshift/cluster_security_group_tests.rb
fog-aws-3.3.0 tests/requests/redshift/cluster_security_group_tests.rb
fog-aws-3.2.0 tests/requests/redshift/cluster_security_group_tests.rb
fog-aws-3.1.0 tests/requests/redshift/cluster_security_group_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-aws-2.0.1/tests/requests/redshift/cluster_security_group_tests.rb