コード例 #1
0
def test_delete_db_cluster_no_snapshot(aws_client):
    client = MagicMock()
    aws_client.return_value = client
    cluster_id = 'some-aurora-identifier'
    delete_db_cluster(db_cluster_identifier=cluster_id,
                      skip_final_snapshot=True)

    client.delete_db_cluster.assert_called_with(DBClusterIdentifier=cluster_id,
                                                SkipFinalSnapshot=True)
コード例 #2
0
def test_delete_db_cluster(aws_client):
    client = MagicMock()
    aws_client.return_value = client
    cluster_id = 'some-aurora-identifier'
    delete_db_cluster(db_cluster_identifier=cluster_id,
                      skip_final_snapshot=False,
                      db_snapshot_identifier='%s-final-snapshot' % cluster_id)

    client.delete_db_cluster.assert_called_with(
        DBClusterIdentifier=cluster_id,
        SkipFinalSnapshot=False,
        FinalDBSnapshotIdentifier='%s-final-snapshot' % cluster_id)