mirror of
https://github.com/healthchecks/healthchecks.git
synced 2025-04-11 15:51:19 +00:00
Remove Ping.body field
This commit is contained in:
parent
997154e3b0
commit
3e5080d9eb
4 changed files with 20 additions and 4 deletions
hc
17
hc/api/migrations/0109_remove_ping_body.py
Normal file
17
hc/api/migrations/0109_remove_ping_body.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Generated by Django 5.0.7 on 2024-07-11 13:27
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('api', '0108_move_body_to_body_raw'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='ping',
|
||||
name='body',
|
||||
),
|
||||
]
|
|
@ -635,7 +635,6 @@ class Ping(models.Model):
|
|||
remote_addr = models.GenericIPAddressField(blank=True, null=True)
|
||||
method = models.CharField(max_length=10, blank=True)
|
||||
ua = models.CharField(max_length=200, blank=True)
|
||||
body = models.TextField(blank=True, null=True)
|
||||
body_raw = models.BinaryField(null=True)
|
||||
object_size = models.IntegerField(null=True)
|
||||
exitstatus = models.SmallIntegerField(null=True)
|
||||
|
|
|
@ -36,7 +36,7 @@ class PingBodyTestCase(BaseTestCase):
|
|||
self.assertEqual(r.status_code, 404)
|
||||
|
||||
def test_it_allows_cross_team_access(self) -> None:
|
||||
Ping.objects.create(owner=self.check, body="this is body")
|
||||
Ping.objects.create(owner=self.check)
|
||||
|
||||
self.client.login(username="bob@example.org", password="password")
|
||||
r = self.client.get(self.url)
|
||||
|
|
|
@ -70,7 +70,7 @@ class PingDetailsTestCase(BaseTestCase):
|
|||
self.assertContains(r, "5 min 0 sec", status_code=200)
|
||||
|
||||
def test_it_requires_logged_in_user(self) -> None:
|
||||
Ping.objects.create(owner=self.check, n=1, body="this is body")
|
||||
Ping.objects.create(owner=self.check, n=1)
|
||||
|
||||
r = self.client.get(self.url)
|
||||
self.assertRedirects(r, "/accounts/login/?next=" + self.url)
|
||||
|
@ -124,7 +124,7 @@ class PingDetailsTestCase(BaseTestCase):
|
|||
self.assertContains(r, "bar-456", status_code=200)
|
||||
|
||||
def test_it_allows_cross_team_access(self) -> None:
|
||||
Ping.objects.create(owner=self.check, n=1, body="this is body")
|
||||
Ping.objects.create(owner=self.check, n=1)
|
||||
|
||||
self.client.login(username="bob@example.org", password="password")
|
||||
r = self.client.get(self.url)
|
||||
|
|
Loading…
Add table
Reference in a new issue