a2a-source-edit: write tests/test_full_stack_contract.py

This commit is contained in:
a2a-cloud
2026-07-18 05:35:32 +00:00
parent 0d396b1fb5
commit 578845a245

View File

@@ -34,6 +34,7 @@ def test_full_stack_product_contract():
frontend = (ROOT / "frontend" / "src" / "App.jsx").read_text(encoding="utf-8")
assert "frontend:" in manifest and "mount: /app" in manifest
assert "version: 0.1.1" in manifest
assert "public: false" in manifest
assert "resources:" in manifest and "databases:" in manifest
assert "migrations:" in manifest and "db/migrations" in manifest
@@ -42,13 +43,14 @@ def test_full_stack_product_contract():
assert "LLMProvisioning" not in source and "ctx.llm" not in source
assert "Skill runner" not in frontend
assert "QuoteJudge Studio" in frontend
assert "config.json" not in frontend, "frontend should use a2a.js config loader rather than hard-code platform metadata"
assert "A2A_LITELLM" not in frontend and "DATABASE_URL" not in frontend
migrations = list((ROOT / "db" / "migrations").glob("*.sql"))
assert migrations and all(path.read_text(encoding="utf-8").strip() for path in migrations)
assert "005_quotejudge_receipt_compat.sql" in {path.name for path in migrations}
card = load_local_project(ROOT).agent_cls().card()
assert card.version == "0.1.1"
skill_names = {skill.name for skill in card.skills}
assert {"compare_quotes", "get_comparison", "upload_quotes", "upload_quote_file"}.issubset(skill_names)
databases = card.runtime.platform_resources.databases