- crm/tests: 27 тестов через настоящий server.main на sqlite-бэкенде (валидация заказов, цена только из каталога, honeypot, дедупликация, трекинг и отмена гостем, стоп-лист, аутентификация, гигиена текста, гейт расписания бара) - .gitea/workflows/ci.yml: test-джоба + deploy (только push в main, после тестов): rsync кода -> pre-flight docker compose config -> pg_dump бэкап БД (ротация 7) -> up -d --build -> health-check - деплой на neon-bar86.ru идёт деплой-ключом из secrets репозитория
This commit is contained in:
1 parent
da5b259d06
commit
881ef45be5
8 files changed
+469
No files matched your search
@@ -0,0 +1,26 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Публичные (безавторизационные) эндпоинты сайта."""
|
||||
|
||||
|
||||
def test_catalog_public(api):
|
||||
status, body = api.request("GET", "/api/catalog")
|
||||
assert status == 200
|
||||
# «новинки» от владельца — на свежей базе список внутри может быть пуст
|
||||
assert body is not None
|
||||
|
||||
|
||||
def test_stoplist_public(api):
|
||||
status, body = api.request("GET", "/api/stoplist")
|
||||
assert status == 200
|
||||
|
||||
|
||||
def test_hall_names_public(api):
|
||||
status, body = api.request("GET", "/api/halls/names")
|
||||
assert status == 200
|
||||
assert isinstance(body.get("tables"), list) and body["tables"]
|
||||
|
||||
|
||||
def test_track_unknown_code_404(api):
|
||||
status, body = api.request("GET", "/api/track/ZZZZZZZZ")
|
||||
assert status == 404
|
||||
assert "error" in body
|
||||
Reference in new issue
Block a user