Push tests follow the counterparty readers and 11 apps; document MODULE_EVENT_READER_ROLES
Fixes Atrium#53 run 2, points 3 and 5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -110,6 +110,9 @@ MODEL_PROVIDER_MIGRATOR_ROLES=
|
||||
# 0.20.0, revision 0011): SELECT + INSERT under row-level security, each only once it is also in
|
||||
# IDENTITY_READER_ROLES. The hub's own runtime role always takes part. Empty standalone.
|
||||
MODULE_EVENT_EMITTER_ROLES=
|
||||
# The READER tier (dredd-core 0.23.0): runtime roles that may only SELECT the log (a module that
|
||||
# reports on it and says nothing). A role is an emitter or a reader, never both. Empty standalone.
|
||||
MODULE_EVENT_READER_ROLES=
|
||||
# The shared counterparty register (dredd-core 0.21.0, revision 0012): the modules' runtime roles
|
||||
# that WRITE it (Sygna, Galena), the ones that only READ it (Agora, Parafa), and the migrators that move their own counterparties in (import door) and point foreign keys
|
||||
# at it. Each only once also joined (IDENTITY_READER_ROLES / IDENTITY_MIGRATOR_ROLES). The hub's own
|
||||
|
||||
@@ -341,7 +341,10 @@ class TestTheHalfDoneShapesOfOneAccountAreRefused:
|
||||
|
||||
def test_each_module_is_checked_with_the_counterparty_tier_the_hub_grants_it(self, rig):
|
||||
done, trace = _push(rig, platform=True, trace="cp-tiers", settings={"atrium": {
|
||||
"COUNTERPARTY_WRITER_ROLES": "sygna_app", "COUNTERPARTY_READER_ROLES": "galena_app"}})
|
||||
# Galena, Agora and Parafa point foreign keys at the register (CP_NEEDED), so the hub has to
|
||||
# list all three; Galena as a reader here, to prove the check follows the listed tier.
|
||||
"COUNTERPARTY_WRITER_ROLES": "sygna_app",
|
||||
"COUNTERPARTY_READER_ROLES": "galena_app,agora_app,parafa_app"}})
|
||||
assert done.returncode == 0, done.stdout + done.stderr
|
||||
checks = {app: [line for line in trace.splitlines()
|
||||
if "managed check" in line and f"--app-role {app}_app" in line]
|
||||
@@ -666,7 +669,7 @@ class TestEveryAppIsProvisionedBeforeAnyMigrates:
|
||||
def test_the_budget_counts_a_module_only_when_it_runs(self, rig):
|
||||
on, _ = _push(rig, "--dry-run", platform=False, trace="budget-on")
|
||||
off, _ = _push(rig, "--dry-run", platform=False, trace="budget-off", compose_env=".env.off")
|
||||
assert re.search(r"budget\s+12 apps x", on.stdout), on.stdout
|
||||
assert re.search(r"budget\s+11 apps x", on.stdout), on.stdout # Panorama left
|
||||
assert re.search(r"budget\s+4 apps x", off.stdout), off.stdout
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user