Sha256: 39b8e94470b86b84c84edafb9220afc39636c3973551ac019df38f4a820212ec

Contents?: true

Size: 1.51 KB

Versions: 41

Compression:

Stored size: 1.51 KB

Contents

Shindo.tests('AWS::RDS | cluster requests', ['aws', 'rds']) do
  suffix = rand(65535).to_s(16)

  @cluster_id        = "fog-test-#{suffix}"
  @master_id         = "fog-master-#{suffix}"
  @final_snapshot_id = "fog-snapshot-#{suffix}"

  tests("success") do
    tests("#create_db_cluster").formats(AWS::RDS::Formats::CREATE_DB_CLUSTER) do
      result = Fog::AWS[:rds].create_db_cluster(@cluster_id,
                                                'Engine'             => 'aurora',
                                                'MasterUsername'     => "fog-#{suffix}",
                                                'MasterUserPassword' => "fog-#{suffix}"
                                               ).body

      cluster = result['CreateDBClusterResult']['DBCluster']
      returns("1")             { cluster['AllocatedStorage'] }
      returns('aurora')        { cluster['Engine'] }
      returns("fog-#{suffix}") { cluster['MasterUsername'] }
      result
    end

    tests("#describe_db_clusters").formats(AWS::RDS::Formats::DESCRIBE_DB_CLUSTERS) do
      Fog::AWS[:rds].describe_db_clusters.body
    end

    tests("#delete_db_cluster").formats(AWS::RDS::Formats::DELETE_DB_CLUSTER) do
      body = Fog::AWS[:rds].delete_db_cluster(@cluster_id, @final_snapshot_id).body

      tests('final snapshot') do
        returns('creating') { Fog::AWS[:rds].describe_db_cluster_snapshots(:snapshot_id => @final_snapshot_id).body['DescribeDBClusterSnapshotsResult']['DBClusterSnapshots'].first['Status'] }
      end

      body
    end
  end
end

Version data entries

41 entries across 39 versions & 2 rubygems

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