Esempio n. 1
0
def diagnostic(request):
    result = {}
    result.update(check_dynamodb(get_dynamodb_connection(),
                                 dynamodb_table_names()))
    status_code = 200 if result['dynamodb'] == 'pass' else 500
    return status_code, result
Esempio n. 2
0
def test_check_dynamo_db_failed(dynamodb_connection):  # noqa
    result = check_dynamodb(dynamodb_connection, ['not-exist'])
    assert 'dynamodb' in result
    assert result['dynamodb'] == 'fail'
    assert 'dynamodb_exception' in result
Esempio n. 3
0
def diagnostic(request):
    result = {}
    result.update(
        check_dynamodb(get_dynamodb_connection(), dynamodb_table_names()))
    status_code = 200 if result['dynamodb'] == 'pass' else 500
    return status_code, result
Esempio n. 4
0
def test_check_dynamo_db(dynamodb_connection, dynamodb_table_name):  # noqa
    result = check_dynamodb(dynamodb_connection, [dynamodb_table_name])
    assert 'dynamodb' in result