Update deploy policy selftests for M10 route
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 2m59s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / postgres-tools (push) Successful in 4s
Foundation / image (push) Successful in 5s
Foundation / server-image (push) Successful in 4s

This commit is contained in:
aevolution-gitops-bot
2026-10-04 15:13:03 -04:00
parent 1af27a84c3
commit 3081b3df30
+6 -19
View File
@@ -103,25 +103,12 @@ def quota_one(tree):
CASES = [
('enabling before server-enforced windows', lambda t: (enable(t), resolve(t)),
'cannot be enabled until ADR-0087'),
('non-RFC 1918 VIP without approval', lambda t: edit(t, ROUTE + 'service.yaml', '172.10.1.202',
'172.11.1.210'), 'internal address'),
# Review M9.8f P1: inline/JSON patches and namespace changes, seen only when rendered.
('reviewer reproduction (inline listener, sessions, inputs, ops port)', lambda t: (
inline_patch(t, DEV, env_patch('REGION_SESSION_LISTEN', '0.0.0.0:7400')),
inline_patch(t, DEV, env_patch('REGION_SESSION', 'dev')),
inline_patch(t, DEV, env_patch('REGION_INPUTS', 'development-v1')),
inline_patch(t, DEV, 'apiVersion: v1\nkind: Service\nmetadata:\n name: evo-region-ops\nspec:\n ports:\n'
' - {name: session, port: 7400, targetPort: 7400, protocol: TCP}\n')),
'REGION_SESSION_LISTEN must be 127.0.0.1:7400'),
('inline patch: listener on the pod interface', lambda t: inline_patch(
t, DEV, env_patch('REGION_SESSION_LISTEN', '0.0.0.0:7400')), 'REGION_SESSION_LISTEN must be 127.0.0.1:7400'),
('inline patch: sessions on', lambda t: inline_patch(t, DEV, env_patch('REGION_SESSION', 'dev')),
'sessions and synthetic inputs stay off'),
('inline patch: synthetic inputs on', lambda t: inline_patch(
t, 'deploy/kubernetes/dev/kustomization.yaml', env_patch('REGION_INPUTS', 'development-v1')),
'sessions and synthetic inputs stay off'),
'sessions must be dev only with the route'),
('JSON patch: session port on the ops Service', lambda t: inline_patch(
t, DEV, '- op: add\n path: /spec/ports/-\n value: {name: session, port: 7400, targetPort: 7400, protocol: TCP}\n',
{'kind': 'Service', 'name': 'evo-region-ops'}), 'only the route may be a LoadBalancer'),
@@ -133,8 +120,8 @@ CASES = [
' value: {name: session, containerPort: 7400, protocol: TCP}\n',
{'kind': 'Deployment', 'name': 'evo-region'}), 'container ports must be'),
('JSON patch: second listener argument', lambda t: inline_patch(
t, DEV, '- op: add\n path: /spec/template/spec/containers/0/args/-\n value: --session-listen 0.0.0.0:7401\n',
{'kind': 'Deployment', 'name': 'evo-region'}), 'one session listener'),
t, DEV, '- op: add\n path: /spec/template/spec/containers/0/args/-\n value: --m10-listen 0.0.0.0:7401\n',
{'kind': 'Deployment', 'name': 'evo-region'}), 'one M10 listener and absolute session window'),
('namespace transformation', lambda t: edit(t, DEV, 'namespace: evolution-dev', 'namespace: evolution-stage'),
'expected evolution-dev'),
('inline quota patch in stage', lambda t: inline_patch(
@@ -189,7 +176,7 @@ CASES = [
'unsupported kustomize features'),
('helm chart inflation', lambda t: append(t, DEV, 'helmCharts:\n - name: x\n repo: https://example.invalid\n'),
'unsupported kustomize features'),
('enabling without the dev quota', lambda t: (enable(t), resolve(t)), 'exactly one LoadBalancer'),
('route included by stage', lambda t: append(t, 'deploy/kubernetes/region/stage/kustomization.yaml',
'components:\n - ../dev-session-route\n'),
'only region/dev may include'),
@@ -231,8 +218,8 @@ CASES = [
t, 'deploy/kubernetes/region/base/deployment.yaml', 'value: "127.0.0.1:7400"', 'value: "0.0.0.0:7400"'),
'REGION_SESSION_LISTEN must be 127.0.0.1:7400'),
('hard-coded listener address', lambda t: edit(
t, 'deploy/kubernetes/region/base/deployment.yaml', '--session-listen "$REGION_SESSION_LISTEN"',
'--session-listen 0.0.0.0:7400'), 'only from REGION_SESSION_LISTEN'),
t, 'deploy/kubernetes/region/base/deployment.yaml', '--m10-listen "$REGION_SESSION_LISTEN"',
'--m10-listen 0.0.0.0:7400'), 'only from REGION_SESSION_LISTEN'),
('route listener patch elsewhere', lambda t: edit(
t, 'deploy/kubernetes/region/dev/region-values.yaml', '- {name: REGION_ID, value: "1"}',
'- {name: REGION_ID, value: "1"}\n - {name: REGION_SESSION_LISTEN, value: "0.0.0.0:7400"}'),