feat(multiplayer): add shared allocation quota

This commit is contained in:
Josh Creek
2026-09-01 18:38:06 +01:00
parent 55706ba9ea
commit 72e8d27633
11 changed files with 211 additions and 4 deletions
+6
View File
@@ -6,6 +6,7 @@ import unittest
SQL = (Path(__file__).parent / "0001_initial.sql").read_text()
ASSIGNMENTS_SQL = (Path(__file__).parent / "0002_assignments.sql").read_text()
QUOTAS_SQL = (Path(__file__).parent / "0007_allocation_quotas.sql").read_text()
class MigrationTest(unittest.TestCase):
@@ -53,6 +54,11 @@ class MigrationTest(unittest.TestCase):
):
self.assertIn(fragment, ASSIGNMENTS_SQL)
def test_allocation_quotas_are_optional_and_region_bound(self):
for fragment in ("CREATE TABLE allocation_quotas", "region TEXT PRIMARY KEY", "window_seconds", "max_allocations"):
self.assertIn(fragment, QUOTAS_SQL)
self.assertIn("region IN ('EU', 'NA')", QUOTAS_SQL)
if __name__ == "__main__":
unittest.main()