Add independent one-second host WAN telemetry MIT source; preserve existing platform/history
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 UCVL (Youchuang Future)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,28 @@
|
||||
# Host traffic R2:保留超级管理员已有监视权限
|
||||
|
||||
生产操作账号为启用的 superuser,但 is_staff=False。R1 的新监视 API 只接受 is_staff 导致 403;这里仅把该 API 的角色判断改为 `is_staff or is_superuser`。设备、会话、订阅、账号有效性检查全部保留。普通非 staff 非 superuser 仍 403,停用 superuser 仍 403。不修改任何账号角色或原有核心鉴权、profile、middleware、路由、限速、数据库 Schema。
|
||||
|
||||
R1 目录、源码和 manifest 不动。持久覆盖只增加本目录的 `control/host_traffic.py` 和 `docker-compose.host-traffic-auth-r2.yml`,后者叠在已部署四个 Compose 文件之后,替换唯一 `/app/control/host_traffic.py` 只读 bind。R1 的 URLs、store、独立 SQLite 状态目录和 startup=false 环境继续继承;保留 app UID100/GID101,不修改用户身份。
|
||||
|
||||
主任务核验 SHA、只上传新 R2 目录,设置代码文件 0644,再执行:
|
||||
|
||||
```sh
|
||||
cd /opt/toplc-vpn
|
||||
docker compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.shared-budget-web.yml -f /opt/toplc-vpn/host-traffic-standalone-20261106/docker-compose.host-traffic.yml -f /opt/toplc-vpn/host-traffic-standalone-20261106-r2/docker-compose.host-traffic-auth-r2.yml config --quiet
|
||||
docker compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.shared-budget-web.yml -f /opt/toplc-vpn/host-traffic-standalone-20261106/docker-compose.host-traffic.yml -f /opt/toplc-vpn/host-traffic-standalone-20261106-r2/docker-compose.host-traffic-auth-r2.yml up -d --no-deps --no-build --pull never web
|
||||
```
|
||||
|
||||
该命令仅重建 web,沿用已部署镜像和四文件配置,不启动任何迁移。主任务前后须核对 core source/schema/Node/RoutingPolicy/账号角色摘要、其它容器 PID/StartedAt/镜像一致;使用现有真实 token 验证 superuser 200、无 token401,返回3台真实秒级数据。不能因本地测试通过而声称生产验收完成。
|
||||
|
||||
本地真实 Django5.2.17 + 正式模型快照回归命令(不连服务器):
|
||||
|
||||
```powershell
|
||||
& 'output/proxy-aggregate-api-20261106/test-venv/Scripts/python.exe' 'services/toplc-vpn-platform/host-traffic-standalone-20261106-r2/tests/run_auth_regression.py'
|
||||
```
|
||||
|
||||
13 项 API 安全测试包含“非 staff 超级管理员200”“普通非 staff403”“停用超级管理员403”,以及原会话到期/撤销、设备禁用、账号状态、订阅到期/配额等检查。请求中的 Django SQL 仍全部 SELECT;测试角色修改只发生于本地 SQLite fixture。
|
||||
|
||||
|
||||
MIT source supplement: these files are published as a separate directory only. They do not replace the platform root, existing routes, source history or other licenses. Integration tests use an existing Django platform model fixture; production model snapshots, accounts, tokens, SQLite state and local output evidence are not included. Configure example endpoints for your deployment. Source publication does not assert production acceptance.
|
||||
|
||||
The frozen candidate manifest hashes describe original source bytes before MIT README supplements and public endpoint substitutions; SOURCE-PROVENANCE.json records both original and published hashes. The R2 API differs from frozen R1 only in allowing existing staff OR existing superuser. This source tool does not perform deployment or assert production acceptance.
|
||||
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"DeploymentPerformedByThisTool": false,
|
||||
"Feature": "one-second-physical-wan-traffic",
|
||||
"FrozenR1WorkspaceChangedByThisTool": false,
|
||||
"License": "MIT",
|
||||
"OriginalPrivateR1Branch": "codex/host-traffic-20261106",
|
||||
"OriginalPrivateR1Commit": "30f06edec04cc8bf7394aeb302e09e6c37e27c86",
|
||||
"OriginalSourceSha256": {
|
||||
"host-traffic-sampler/README.md": "d7e189279e6cefdecd296b66a8d52524dc7a92250b423b41b721f155db0b84a4",
|
||||
"host-traffic-sampler/deploy_host_traffic_sampler.sh": "910e7234b6913e22b7e4aeb4b7ac7e74831e5038af1700e33073f42c14b0fe88",
|
||||
"host-traffic-sampler/host-traffic-contract-fixture.json": "f873e3f62982783fc29cc4f3bc9d298f3420a9e67bae085aeb4e6eeafed58696",
|
||||
"host-traffic-sampler/host_traffic_sampler.py": "16f0e42b7f67c121e225b5c3e0e01c64ed54dcc8ffe52234b8aaa15def575e49",
|
||||
"host-traffic-sampler/test_host_traffic_sampler.py": "0d160ab9640d58c9487d69183246ed7c2380322e367caebeff16364d3257a2bd",
|
||||
"host-traffic-sampler/toplc-vpn-host-traffic.service": "f2ba0a79822457511717c2514ac7988d93d01bf71a39c027fd8267ecf6f8da44",
|
||||
"host-traffic-standalone-20261106-r2/README.md": "0427c3c2448d553167fa361940865aee4bb1b7bb50691721a5989353b5edc997",
|
||||
"host-traffic-standalone-20261106-r2/candidate-manifest.json": "c7b252a860af93f35c6db44da15073dee50cbce5ea23be9cf29d9949e5fdfc62",
|
||||
"host-traffic-standalone-20261106-r2/control/host_traffic.py": "c66421de2fbb74ab3b20ca771f6e2463737163eb6e245d56cc3875053e696d03",
|
||||
"host-traffic-standalone-20261106-r2/docker-compose.host-traffic-auth-r2.yml": "59a410949dd7900906aa6d6693a40759a90ddd23d34a7686b00715010afa5379",
|
||||
"host-traffic-standalone-20261106-r2/tests/run_auth_regression.py": "4f2d8d0ea6be83fd177e3a0f2133cb3255653df2f43bc70af6b4e31b2894805f",
|
||||
"host-traffic-standalone-20261106/README.md": "6ab4f38aa115f8b1e2442bfefbec8a5a8210af889673614a80a91192608e12c0",
|
||||
"host-traffic-standalone-20261106/control/host_traffic.py": "a63b10ba3c6ca4b465cd77e11c868df2b9876ab2b10ec358e1d5ee37d99fee12",
|
||||
"host-traffic-standalone-20261106/control/host_traffic_store.py": "c5a6a986208879417ac51bb4b395794e1e0a235cac34f609a572804eb90091b8",
|
||||
"host-traffic-standalone-20261106/control/urls.py": "4f055b0de4d6a7593cbf00db0bc15c8f8e8644afa4618bebca79c738ac916002",
|
||||
"host-traffic-standalone-20261106/docker-compose.host-traffic.yml": "990656d4044c02106917479490e2619cccd1097dda65be8b75f1f84e570e60c6",
|
||||
"host-traffic-standalone-20261106/tests/run_tests.py": "715f80bfe11643d4b01b84c09d02b13eb5d371680a4ddd0cee23c463150d9bab"
|
||||
},
|
||||
"PrivateHistoryIncluded": false,
|
||||
"PrivateR1BaseBranch": null,
|
||||
"PrivateR1BaseCommit": null,
|
||||
"PrivateR1ReceiptSha256": null,
|
||||
"ProductionAcceptanceAsserted": false,
|
||||
"PublicBaseBranch": "codex/public-windows-0.3.5-20261106",
|
||||
"PublicBaseCommit": "7f7d4f6d35fc18a47207c6e197aa6b2fc828c91e",
|
||||
"PublicBaseReceiptSha256": "32e340ad4e82cf4e1f44891ed1daf426fb2de71cba937d53abbe6edd2dc88b43",
|
||||
"R2ApiRoleGate": "existing is_staff OR existing is_superuser",
|
||||
"R2CandidateSha256": "6d1243c6cdedf05b60420a45ebe6ad9feeec5a856ccbc307a02fd49fbb5811a3",
|
||||
"R2OriginalManifestSha256": "c7b252a860af93f35c6db44da15073dee50cbce5ea23be9cf29d9949e5fdfc62",
|
||||
"Schema": 1,
|
||||
"SelectedSourceSha256": {
|
||||
"backend/host-traffic-sampler/LICENSE": "b7e94910b8dc377b0a05ccde3c6e5941838dfc15c9dd790078d11728205b524e",
|
||||
"backend/host-traffic-sampler/README.md": "8103d07ab651832a1529669f65b12cecc0a5abaca9b95e948caed9ff3148dfcd",
|
||||
"backend/host-traffic-sampler/deploy_host_traffic_sampler.sh": "910e7234b6913e22b7e4aeb4b7ac7e74831e5038af1700e33073f42c14b0fe88",
|
||||
"backend/host-traffic-sampler/host-traffic-contract-fixture.json": "f873e3f62982783fc29cc4f3bc9d298f3420a9e67bae085aeb4e6eeafed58696",
|
||||
"backend/host-traffic-sampler/host_traffic_sampler.py": "d4b7f02ec39092cfc141e8275019c7b3b7458b6bf7096fe511742df9113bcab3",
|
||||
"backend/host-traffic-sampler/test_host_traffic_sampler.py": "0c1cb6cf306ed16976781b614ff27203a06bdb6eb20fa734c3681c9a4f5a3023",
|
||||
"backend/host-traffic-sampler/toplc-vpn-host-traffic.service": "f2ba0a79822457511717c2514ac7988d93d01bf71a39c027fd8267ecf6f8da44",
|
||||
"backend/host-traffic-standalone-20261106-r2/LICENSE": "b7e94910b8dc377b0a05ccde3c6e5941838dfc15c9dd790078d11728205b524e",
|
||||
"backend/host-traffic-standalone-20261106-r2/README.md": "275932318caa6ef5c69bdaeb12ec84f8f0b9a06aa3ae472cf70c9727980bf175",
|
||||
"backend/host-traffic-standalone-20261106-r2/candidate-manifest.json": "c7b252a860af93f35c6db44da15073dee50cbce5ea23be9cf29d9949e5fdfc62",
|
||||
"backend/host-traffic-standalone-20261106-r2/control/host_traffic.py": "c66421de2fbb74ab3b20ca771f6e2463737163eb6e245d56cc3875053e696d03",
|
||||
"backend/host-traffic-standalone-20261106-r2/docker-compose.host-traffic-auth-r2.yml": "59a410949dd7900906aa6d6693a40759a90ddd23d34a7686b00715010afa5379",
|
||||
"backend/host-traffic-standalone-20261106-r2/tests/run_auth_regression.py": "4f2d8d0ea6be83fd177e3a0f2133cb3255653df2f43bc70af6b4e31b2894805f",
|
||||
"backend/host-traffic-standalone-20261106/LICENSE": "b7e94910b8dc377b0a05ccde3c6e5941838dfc15c9dd790078d11728205b524e",
|
||||
"backend/host-traffic-standalone-20261106/README.md": "ffe1a73fcffcbc9bc137f8215b035887bfa2de00dc05bde53b2a91e52684f393",
|
||||
"backend/host-traffic-standalone-20261106/control/host_traffic.py": "a63b10ba3c6ca4b465cd77e11c868df2b9876ab2b10ec358e1d5ee37d99fee12",
|
||||
"backend/host-traffic-standalone-20261106/control/host_traffic_store.py": "c5a6a986208879417ac51bb4b395794e1e0a235cac34f609a572804eb90091b8",
|
||||
"backend/host-traffic-standalone-20261106/control/urls.py": "4f055b0de4d6a7593cbf00db0bc15c8f8e8644afa4618bebca79c738ac916002",
|
||||
"backend/host-traffic-standalone-20261106/docker-compose.host-traffic.yml": "990656d4044c02106917479490e2619cccd1097dda65be8b75f1f84e570e60c6",
|
||||
"backend/host-traffic-standalone-20261106/tests/run_tests.py": "715f80bfe11643d4b01b84c09d02b13eb5d371680a4ddd0cee23c463150d9bab"
|
||||
},
|
||||
"SourceOnly": true,
|
||||
"TargetBranch": "codex/public-host-traffic-20261106",
|
||||
"TargetRepository": "admin/ucvl-zonghengjia-open-source"
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"kind": "standalone-host-traffic-api-rbac-r2",
|
||||
"created_at": "2026-11-06T08:09:46.015404+00:00",
|
||||
"parent_candidate_sha256": "a4102ac16e95da335ca9c5a75e7de35a04cc63e7d29615d95b0fd89b5a5bf491",
|
||||
"r1_manifest_sha256": "876bb3436a82b125a3af0514e29f2f38d9ef823cc6acc20e33f622477378796c",
|
||||
"r1_api_sha256": "a63b10ba3c6ca4b465cd77e11c868df2b9876ab2b10ec358e1d5ee37d99fee12",
|
||||
"files_sha256": {
|
||||
"docker-compose.host-traffic-auth-r2.yml": "59a410949dd7900906aa6d6693a40759a90ddd23d34a7686b00715010afa5379",
|
||||
"README.md": "0427c3c2448d553167fa361940865aee4bb1b7bb50691721a5989353b5edc997",
|
||||
"control/host_traffic.py": "c66421de2fbb74ab3b20ca771f6e2463737163eb6e245d56cc3875053e696d03",
|
||||
"tests/run_auth_regression.py": "4f2d8d0ea6be83fd177e3a0f2133cb3255653df2f43bc70af6b4e31b2894805f"
|
||||
},
|
||||
"security_report_sha256": "486745abeadabbe1a5dcc6ee1e8c516d0316d9c0f588f594e7bd4c42105b5f18",
|
||||
"security_tests": {
|
||||
"passed": true,
|
||||
"tests_run": 13,
|
||||
"failures": 0,
|
||||
"errors": 0,
|
||||
"django_version": "5.2.17",
|
||||
"actual_production_models": true,
|
||||
"primary_database_dml_in_requests": false,
|
||||
"production_modified": false,
|
||||
"api_source_sha256": "c66421de2fbb74ab3b20ca771f6e2463737163eb6e245d56cc3875053e696d03"
|
||||
},
|
||||
"functional_change": "Only new API role gate permits existing staff OR existing superuser; all other checks unchanged",
|
||||
"production_modified": false,
|
||||
"candidate_sha256": "6d1243c6cdedf05b60420a45ebe6ad9feeec5a856ccbc307a02fd49fbb5811a3"
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
"""Isolated endpoints for true one-second host WAN telemetry, never billing."""
|
||||
import hashlib
|
||||
import secrets
|
||||
import sqlite3
|
||||
|
||||
from django.http import JsonResponse
|
||||
from django.utils import timezone
|
||||
from django.views.decorators.cache import never_cache
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
from django.views.decorators.http import require_GET, require_POST
|
||||
from django.views.decorators.vary import vary_on_headers
|
||||
|
||||
from .models import ClientSession, Node
|
||||
from . import host_traffic_store as store
|
||||
|
||||
|
||||
def _token(request):
|
||||
authorization = request.headers.get("Authorization", "")
|
||||
if not authorization.startswith("Bearer "):
|
||||
return None
|
||||
token = authorization[7:].strip()
|
||||
return token if 32 <= len(token) <= 256 else None
|
||||
|
||||
|
||||
def _client_allowed(request):
|
||||
token = _token(request)
|
||||
if token is None:
|
||||
return JsonResponse({"error": "Client access token required."}, status=401)
|
||||
digest = hashlib.sha256(token.encode()).hexdigest()
|
||||
session = ClientSession.objects.select_related("device", "subscription__user", "subscription__plan").filter(token_digest=digest, revoked_at__isnull=True).first()
|
||||
if session is None or not secrets.compare_digest(session.token_digest, digest) or not session.is_valid:
|
||||
return JsonResponse({"error": "Client login expired."}, status=401)
|
||||
if not session.device.active or session.device.subscription_id != session.subscription_id:
|
||||
return JsonResponse({"error": "Client device unavailable."}, status=403)
|
||||
user = session.subscription.user
|
||||
if not user.service_enabled or not (user.is_staff or user.is_superuser) or not session.subscription.is_usable:
|
||||
return JsonResponse({"error": "Server traffic monitoring is not permitted."}, status=403)
|
||||
return None
|
||||
|
||||
|
||||
@never_cache
|
||||
@vary_on_headers("Authorization")
|
||||
@require_GET
|
||||
def client_node_traffic(request):
|
||||
# Existing model properties enforce the same token/account/expiry/quota policy
|
||||
# as the production login helper, without its writes to last_seen/status.
|
||||
denial = _client_allowed(request)
|
||||
if denial is not None:
|
||||
return denial
|
||||
try:
|
||||
since = store.timestamp(request.GET["since"]) if "since" in request.GET else None
|
||||
nodes = list(Node.objects.filter(active=True, subscription_enabled=True).order_by("sort_order", "region", "name", "pk").values("id", "slug", "name", "region"))
|
||||
if len(nodes) > store.MAX_NODES:
|
||||
return JsonResponse({"error": "Host traffic node capacity exceeded."}, status=503)
|
||||
result = store.snapshot(nodes, timezone.now(), since)
|
||||
except store.InvalidSample:
|
||||
return JsonResponse({"error": "Invalid history range."}, status=400)
|
||||
except sqlite3.Error:
|
||||
return JsonResponse({"error": "Host traffic telemetry temporarily unavailable."}, status=503)
|
||||
response = JsonResponse(result, json_dumps_params={"separators": (",", ":"), "ensure_ascii": False})
|
||||
if len(response.content) > store.MAX_RESPONSE_BYTES:
|
||||
return JsonResponse({"error": "Host traffic response capacity exceeded."}, status=503)
|
||||
return response
|
||||
|
||||
|
||||
@csrf_exempt
|
||||
@never_cache
|
||||
@require_POST
|
||||
def node_host_traffic(request):
|
||||
token = _token(request)
|
||||
slug = request.headers.get("X-Node-Slug", "")
|
||||
if token is None or not 1 <= len(slug) <= 80:
|
||||
return JsonResponse({"error": "Node authentication failed."}, status=401)
|
||||
node = Node.objects.filter(slug=slug, active=True, subscription_enabled=True).first()
|
||||
if node is None or not node.check_agent_token(token):
|
||||
return JsonResponse({"error": "Node authentication failed."}, status=401)
|
||||
try:
|
||||
# Bound reads before deserializing JSON. Real nginx/Django limits remain
|
||||
# in force; this endpoint additionally permits only one small batch.
|
||||
declared = request.META.get("CONTENT_LENGTH", "")
|
||||
if declared and (not declared.isdigit() or int(declared) > store.MAX_BODY_BYTES):
|
||||
raise store.InvalidSample("batch too large")
|
||||
body = request.read(store.MAX_BODY_BYTES + 1)
|
||||
now = timezone.now()
|
||||
points = store.parse_batch(body, node.slug, now)
|
||||
result = store.ingest(node.pk, points, now)
|
||||
except (store.InvalidSample, UnicodeError, OverflowError, TypeError):
|
||||
return JsonResponse({"error": "Invalid host traffic sample batch."}, status=400)
|
||||
except sqlite3.Error:
|
||||
return JsonResponse({"error": "Host traffic telemetry temporarily unavailable."}, status=503)
|
||||
return JsonResponse(result)
|
||||
@@ -0,0 +1,9 @@
|
||||
# Append after the original three files AND R1 host-traffic overlay.
|
||||
# Docker Compose merges volumes by container target, replacing only this API.
|
||||
services:
|
||||
web:
|
||||
volumes:
|
||||
- type: bind
|
||||
source: /opt/toplc-vpn/host-traffic-standalone-20261106-r2/control/host_traffic.py
|
||||
target: /app/control/host_traffic.py
|
||||
read_only: true
|
||||
@@ -0,0 +1,60 @@
|
||||
"""Actual Django 5.2.17 + production model snapshots; no remote operations."""
|
||||
import hashlib
|
||||
import json
|
||||
import runpy
|
||||
import shutil
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
R2 = Path(__file__).resolve().parents[1]
|
||||
R1 = R2.parent / "host-traffic-standalone-20261106"
|
||||
fixture = runpy.run_path(str(R1 / "tests/run_tests.py"), run_name="r1_fixture_bootstrap")
|
||||
runtime = fixture["RUNTIME"]
|
||||
source = R2 / "control/host_traffic.py"
|
||||
shutil.copy2(source, runtime / "control/host_traffic.py")
|
||||
from control import host_traffic
|
||||
assert hashlib.sha256(Path(host_traffic.__file__).read_bytes()).hexdigest() == hashlib.sha256(source.read_bytes()).hexdigest()
|
||||
Base = fixture["EndpointTests"]
|
||||
|
||||
|
||||
class AuthRegression(Base):
|
||||
def test_nonstaff_superuser_allowed(self):
|
||||
self.user.is_staff = False
|
||||
self.user.is_superuser = True
|
||||
self.user.save(update_fields=["is_staff", "is_superuser"])
|
||||
self.assertEqual(self.get().status_code, 200)
|
||||
self.user.refresh_from_db()
|
||||
self.assertFalse(self.user.is_staff)
|
||||
self.assertTrue(self.user.is_superuser)
|
||||
|
||||
def test_ordinary_nonstaff_still_denied(self):
|
||||
self.user.is_staff = False
|
||||
self.user.is_superuser = False
|
||||
self.user.save(update_fields=["is_staff", "is_superuser"])
|
||||
self.assertEqual(self.get().status_code, 403)
|
||||
|
||||
def test_disabled_nonstaff_superuser_still_denied(self):
|
||||
self.user.is_staff = False
|
||||
self.user.is_superuser = True
|
||||
self.user.is_active = False
|
||||
self.user.save(update_fields=["is_staff", "is_superuser", "is_active"])
|
||||
self.assertEqual(self.get().status_code, 403)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
runner = fixture["DiscoverRunner"](verbosity=1)
|
||||
database = runner.setup_databases()
|
||||
try:
|
||||
result = unittest.TextTestRunner(verbosity=2).run(unittest.defaultTestLoader.loadTestsFromTestCase(AuthRegression))
|
||||
out = R2.parents[2] / "output/host-traffic-standalone-20261106-r2"
|
||||
out.mkdir(parents=True, exist_ok=True)
|
||||
report = {"passed": result.wasSuccessful(), "tests_run": result.testsRun,
|
||||
"failures": len(result.failures), "errors": len(result.errors),
|
||||
"django_version": fixture["django"].get_version(), "actual_production_models": True,
|
||||
"primary_database_dml_in_requests": False, "production_modified": False,
|
||||
"api_source_sha256": hashlib.sha256(source.read_bytes()).hexdigest()}
|
||||
(out / "auth-regression-result.json").write_text(json.dumps(report, indent=2), encoding="utf-8")
|
||||
finally:
|
||||
runner.teardown_databases(database)
|
||||
fixture["runtime_context"].cleanup()
|
||||
raise SystemExit(0 if result.wasSuccessful() else 1)
|
||||
Reference in New Issue
Block a user