0
0
Fork 0
mirror of https://github.com/alerta/alerta.git synced 2025-03-13 04:53:16 +00:00
Commit graph

232 commits

Author SHA1 Message Date
Nick Satterly
4ec7abd26d
Move valid scope check to update perms view () 2019-09-22 22:57:32 +02:00
Nick Satterly
7a47817d0c
Sort tags for deterministic comparison () 2019-08-16 11:09:11 +02:00
Asher Foa
9a0c44d88d Fix pytest warnings. ()
pytest thinks that every class that beings with "Test" contains unit tests and emits warnings about it:
```
tests/test_logging.py:42
  /home/travis/build/alerta/alerta/tests/test_logging.py:42: PytestWarning: cannot collect test class 'TestJsonWebhook' because it has a __init__ constructor
    class TestJsonWebhook(WebhookBase):
tests/test_webhooks.py:888
  /home/travis/build/alerta/alerta/tests/test_webhooks.py:888: PytestWarning: cannot collect test class 'TestJsonWebhook' because it has a __init__ constructor
    class TestJsonWebhook(WebhookBase):
tests/test_webhooks.py:899
  /home/travis/build/alerta/alerta/tests/test_webhooks.py:899: PytestWarning: cannot collect test class 'TestTextWebhook' because it has a __init__ constructor
    class TestTextWebhook(WebhookBase):
tests/test_webhooks.py:910
  /home/travis/build/alerta/alerta/tests/test_webhooks.py:910: PytestWarning: cannot collect test class 'TestFormWebhook' because it has a __init__ constructor
    class TestFormWebhook(WebhookBase):
tests/test_webhooks.py:921
  /home/travis/build/alerta/alerta/tests/test_webhooks.py:921: PytestWarning: cannot collect test class 'TestMultiPartFormWebhook' because it has a __init__ constructor
    class TestMultiPartFormWebhook(WebhookBase):
tests/test_webhooks.py:932
  /home/travis/build/alerta/alerta/tests/test_webhooks.py:932: PytestWarning: cannot collect test class 'TestUserDefinedWebhook' because it has a __init__ constructor
    class TestUserDefinedWebhook(WebhookBase):

```

https://travis-ci.org/alerta/alerta/jobs/571685340#L451
2019-08-14 21:57:33 +02:00
Asher Foa
177c788799 Run pre-commit as part of CI to prevent regressions ()
* pyupgrade fixes.

https://github.com/asottile/pyupgrade#oserror-aliases
https://github.com/asottile/pyupgrade#encode-to-bytes-literals

* Fix exception related flake8 issues.

* Run pre-commit on code in travis
2019-08-11 09:36:44 +02:00
Asher Foa
4101535e75 Mark regex strings as raw strings, properly escape strings. () 2019-08-11 00:27:23 +02:00
Asher Foa
2402bc9e7c assertEquals is deprecated. () 2019-08-10 10:55:15 +02:00
Jarno Huuskonen
a8f5643dfa telegram webhook: return error if alert_id is not found. () 2019-07-31 16:05:40 +02:00
Nick Satterly
56967b11b0
Webhooks should use DEFAULT_NORMAL_SEVERITY config setting () 2019-07-26 17:32:06 +02:00
maglo
6fdcc7abf4 Fix authorization logic for OIDC and SAML ()
See 

Changes logic for oidc and saml authorization checks so that
the authorization fails if either of the authorization checks
fail.
2019-06-27 22:29:30 +02:00
Nick Satterly
de9688142f
Amazon Cognito OpenID Connect auth provider ()
* Add support for Amazon Cognito OpenID Connect auth provider

* Add test for Amazon Cognito auth provider

* Pass known auth provider in bearer token
2019-06-20 20:20:17 +02:00
Nick Satterly
98af87edf2
Change Azure auth provider to use Active Directory v2.0 endpoints () 2019-06-07 20:41:09 +02:00
Nick Satterly
494d50bda8
Update GitHub auth to work with v7 web UI () 2019-06-05 20:25:45 +02:00
Nick Satterly
e19527d03c
Only match blackout if non-null rule attribute ()
* Only match blackout if non-null rule attribute

* Add test for null values in blackout rules
2019-06-01 16:11:38 +02:00
Nick Satterly
ce61e35cde
Add explicit test for AWS Cloudwatch INSUFFICIENT_DATA () 2019-05-13 14:26:38 +02:00
Nick Satterly
3f1ce50626
Fix alert actions on alerts with no attributes ()
* Add failing test for alerts with no attributes

* Only update attributes if any are set (mongo only)
2019-04-28 18:59:56 +02:00
Nick Satterly
3b4fc05021
Move aggregations into own tests to avoid race conditions ()
Move aggregations into own tests and expand
2019-04-25 23:42:26 +02:00
Nick Satterly
f89814060e
Update service for correlated and de-duped alerts () 2019-04-24 21:27:12 +02:00
Nick Satterly
cbcb7c53a6
List valid severities when invalid one used () 2019-04-24 00:10:16 +02:00
Nick Satterly
69bebd3ded
Push app config to plugin methods for per-alert config ()
* Push app config to plugin methods for per-alert config

* Add get_config() helper method to plugins

* Explicitly pass kwargs to avoid race conditions using self

* Test config variable precedence
2019-04-23 22:58:14 +02:00
Nick Satterly
dc2349d06c
Fix status change hook alert context ()
* Fix status change hook alert context

* Update status, tags, attributes and text from status change hook
2019-04-17 15:34:55 +02:00
Nick Satterly
19c2fcaa75
Fix alert heartbeats received via webhooks () 2019-04-15 19:03:09 +02:00
Nick Satterly
a7c13ec20d
Add heartbeat plugin to transform alerts into heartbeats () 2019-04-14 22:44:50 +02:00
Nick Satterly
b2dd469645
Use login instead of email for user lookups () 2019-04-10 12:56:03 +02:00
Nick Satterly
cd0298f3ac
Psql update_time column is timestamp not text () 2019-04-08 15:49:29 +02:00
Nick Satterly
81ff6fbf55
Add user groups for role and customer lookup () 2019-04-07 09:33:38 +02:00
Nick Satterly
95f9f26bfc
Cast alert and heartbeat timeout to integers () 2019-04-02 23:30:26 +02:00
Nick Satterly
d27aa84e32
Add option to verify OpenID JWT id_token during login () 2019-04-02 09:45:18 +02:00
Nick Satterly
12e05a9dc8
Use OpenID as auth provider for Azure, GitLab, Google and Keycloak () 2019-04-01 10:36:31 +02:00
Nick Satterly
b836d46255 Extend auth providers tests 2019-04-01 01:00:23 +02:00
Nick Satterly
fbb3572b35
Add tests for auth providers () 2019-03-30 23:59:18 +01:00
Nick Satterly
1f35c7f9bf
Add severity and status counts to services and environments responses ()
* Add severity and status counts to services and environments responses

* Add some tests for aggregate severity and status counts
2019-03-23 19:49:49 +01:00
Nick Satterly
75c707716f
Prevent user with lesser role assigning role with more privileges () 2019-03-22 00:35:43 +01:00
Nick Satterly
b7f5abf9f3
Keep old attributes when updating new ones () 2019-03-21 22:45:03 +01:00
Nick Satterly
c874d7e57a
Add update time to alert model () 2019-03-17 00:21:35 +01:00
Nick Satterly
24d13bf99c
Add user to history log () 2019-03-15 09:39:30 +01:00
Nick Satterly
9ceb27566a
Add housekeeping settings to app config () 2019-03-12 11:20:05 +01:00
Nick Satterly
be589982aa
Indeterminate is an active severity () 2019-03-05 10:52:55 +01:00
Nick Satterly
bf8a2bfc65
Fix Out-of-service for ISA 18.2 alarm model () 2019-03-05 09:46:08 +01:00
Nick Satterly
aca4140946
Use previous status in history for value change () 2019-03-01 10:09:12 +01:00
Nick Satterly
00d04e1f0c
Add endpoint to list alert groups () 2019-02-28 23:43:33 +01:00
Soren Dossing
24e7eb2fe5 python warnings ()
tests/test_plugins.py:182
  alerta/tests/test_plugins.py:182: PytestWarning: cannot collect test class 'TestPlugin1' because it has a __init__ constructor
    class TestPlugin1(PluginBase):

tests/test_plugins.py:202
  alerta/tests/test_plugins.py:202: PytestWarning: cannot collect test class 'TestPlugin2' because it has a __init__ constructor
    class TestPlugin2(PluginBase):

tests/test_plugins.py:217
  alerta/tests/test_plugins.py:217: PytestWarning: cannot collect test class 'TestPlugin3' because it has a __init__ constructor
    class TestPlugin3(PluginBase):

tests/test_plugins.py:236
  alerta/tests/test_plugins.py:236: PytestWarning: cannot collect test class 'TestActionPlugin1' because it has a __init__ constructor
    class TestActionPlugin1(PluginBase):

tests/test_plugins.py::PluginsTestCase::test_reject_alert
  alerta/tests/test_plugins.py:84: DeprecationWarning: Please use assertRegex instead.
    self.assertRegexpMatches(data['id'], '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')

tests/test_plugins.py::PluginsTestCase::test_status_update
  alerta/tests/test_plugins.py:93: DeprecationWarning: Please use assertRegex instead.
    self.assertRegexpMatches(data['id'], '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')
2019-02-22 17:21:43 +01:00
Nick Satterly
41744f7cc7
Fix logging request filter "args" name clash () 2019-02-16 21:09:18 +01:00
Nick Satterly
969f4a7828
Refactor built-in webhooks () 2019-02-16 01:34:18 +01:00
Nick Satterly
0436295072
Fix user role regression introduced in refactor ()
* Fix user role regression introduced in 

* Fix random sort order
2019-01-30 23:14:51 +01:00
Nick Satterly
56b59cef11
Use format method instead of % operator in prometheus webhook () 2019-01-29 22:18:25 +01:00
Nick Satterly
7dd0e20c28
Add test for user updates () 2019-01-15 10:37:22 +01:00
Nick Satterly
2c1d4ef152
Add test for permission updates () 2019-01-15 01:40:27 +01:00
Nick Satterly
9c70866f19
Add test for API key updates () 2019-01-15 01:30:12 +01:00
Nick Satterly
57930a44a9
Add test for blackout updates () 2019-01-15 01:06:40 +01:00
Nick Satterly
c8d50438a5
Add test for customer updates () 2019-01-15 01:03:02 +01:00