Exemple #1
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()}
Exemple #2
0
    def test_crons_not_healthy(self, mock_health):
        mock_health.side_effect = Exception('Connection Refused')

        results = CronsCheck.run()
        assert results['CRONS'].is_healthy is False
        assert results['CRONS'].severity == Result.ERROR
Exemple #3
0
    def test_crons_wrong_results(self, mock_health):
        mock_health.return_value.__enter__.return_value = None

        results = CronsCheck.run()
        assert results['CRONS'].is_healthy is False
        assert results['CRONS'].severity == Result.WARNING
Exemple #4
0
 def test_crons_is_healthy(self):
     results = CronsCheck.run()
     assert results['CRONS'].is_healthy is True