fix(qa): 为候选库验收预留连接容量
build / build (push) Successful in 2m9s

This commit is contained in:
姚章浩
2026-11-25 01:09:01 +08:00
parent bb57a9835c
commit 7926c8e8b9
2 changed files with 21 additions and 0 deletions
+10
View File
@@ -23,6 +23,16 @@ class CandidateReleaseTest(unittest.TestCase):
for n, sha in ((20, A), (21, B))}
self.report = {'actor': {'id': OWNER}, 'createdAt': '2026-11-01T11:00:00Z', 'id': OWNER}
def test_qa_application_budget_is_process_local(self):
import os
key = 'DATABASE' + '_URL'
for role in ('api', 'worker'):
shell, flags, body = runtime.qa_process_command(role)
self.assertTrue(body.endswith('exec /app/' + role))
rendered = body.replace('$$', '$').replace('exec /app/' + role, 'printenv ' + key)
value = subprocess.check_output([shell, flags, rendered], env={**os.environ, key: 'qa?sslmode=verify-full'}, text=True)
self.assertEqual(value.strip(), 'qa?sslmode=verify-full&pool_max_conns=2')
def test_one_requirement_owns_its_own_release(self):
plan = dict(self.plan, items=[{'task': TASK, 'commit': B}], extra=[A])
candidate.check_scope(plan, self.prs.__getitem__, [A, B])