forked from GithubBackups/healthchecks
Add desc to hc.api.schemas.check
This commit is contained in:
parent
9697fc1b45
commit
bffb51357e
@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
|
||||
- Added JSON endpoint for Shields.io (#304)
|
||||
- Django 3.0
|
||||
- `senddeletionnotices` command skips profiles with recent last_active_date
|
||||
- The "Update Check" API call can update check's description (#311)
|
||||
|
||||
### Bug Fixes
|
||||
- Don't set CSRF cookie on first visit. Signup is exempt from CSRF protection
|
||||
|
@ -2,6 +2,7 @@ check = {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {"type": "string", "maxLength": 100},
|
||||
"desc": {"type": "string"},
|
||||
"tags": {"type": "string", "maxLength": 500},
|
||||
"timeout": {"type": "number", "minimum": 60, "maximum": 2592000},
|
||||
"grace": {"type": "number", "minimum": 60, "maximum": 2592000},
|
||||
|
@ -164,3 +164,12 @@ class UpdateCheckTestCase(BaseTestCase):
|
||||
r = self.post(self.check.code, {"api_key": "X" * 32, "channels": None})
|
||||
|
||||
self.assertEqual(r.status_code, 400)
|
||||
|
||||
def test_it_rejects_non_string_desc(self):
|
||||
r = self.post(
|
||||
self.check.code, {"api_key": "X" * 32, "desc": 123}
|
||||
)
|
||||
|
||||
self.assertEqual(r.status_code, 400)
|
||||
|
||||
self.check.refresh_from_db()
|
||||
|
Loading…
x
Reference in New Issue
Block a user