Exemplo n.º 1
0
    def test_broker_connection_upon_none_url(self, mocked_connection):
        mocked_conn = mock.MagicMock()
        mocked_connection.return_value.__enter__.return_value = mocked_conn
        mocked_conn.connect.side_effect = AccessRefused('Connection Refused')

        results = RabbitMQCheck.run()
        assert results['RABBITMQ'].is_healthy is False
        assert results['RABBITMQ'].severity == Result.ERROR
        mocked_connection.assert_called_once_with(None)
Exemplo n.º 2
0
def get_status():
    status = {}
    status.update(CronsCheck.run())
    status.update(EventsCheck.run())
    status.update(HPSearchCheck.run())
    status.update(PipelinesCheck.run())
    status.update(PostgresCheck.run())
    status.update(RabbitMQCheck.run())
    status.update(RedisCheck.run())
    status.update(SchedulerCheck.run())
    status.update(StreamsCheck.run())
    return {k: v.to_dict() for k, v in status.items()}