Expand description
Database rows for the credit-registration (Suotar) system tests. The identities they are built
from, and the matching registry world, are in crate::controllers::mock_suotar::fixtures.
The backfill course keeps enable_credit_registration_via_suotar off and nothing may turn it on:
its spec flips it from the UI, which is one-way and run-wide. Every other course has it on.
The workers tick every phase unscoped every few seconds in the test deployment, so a fixture row nothing may move has to sit on a paused module β that is what the states course is for.
StructsΒ§
- Seeded
Student π - A seeded student, with the deterministic id a spec navigates by.
ConstantsΒ§
- LINKING_
TOKEN_ ALREADY_ USED - LINKING_
TOKEN_ CONFLICT - Its student number is already live on another account, so claiming it is refused without consuming the token.
- LINKING_
TOKEN_ EXPIRED - LINKING_
TOKEN_ VALID - Linking tokens for
suotar-account-linking.spec.ts, seeded rather than mailed. - PULL_
REGISTRAR_ ID - A study registry registrar whose key a spec can present, so the legacy pull stream is readable from a test. Every other registrarβs key is random by design.
- PULL_
REGISTRAR_ SECRET_ KEY - SUPERSEDED_
ATTEMPT_ 1_ ID - The seeded attempt chain, by fixed id so a spec can open the detail page without searching.
- SUPERSEDED_
ATTEMPT_ 2_ ID
FunctionsΒ§
- credit_
registration_ πconfig - Turns the module on and points it at the mockβs realisation for the same course code.
- insert_
registered_ πattempt - insert_
student π - instance_
config π - link_
student_ πnumber - push_
mock_ πsuotar_ world - Aligns the mock Suotarβs world with the rows just written. Nothing is cleared first: the mock installs under a fresh generation and flips the pointer last.
- seed_
admin_ πactions - One
global_adminand onecourse_teacherrow, so the Audit tab has content without depending on another spec having clicked something. - seed_
admin_ πcourse - The account-linking fixtures, on a course of their own.
- seed_
backfill_ πcourse - Four passed completions, one already registered by the legacy pull flow so the backfill spec can assert it is skipped rather than re-pushed.
- seed_
credit_ registration - seed_
eligible_ πcompletion - A completion the pipeline will pick up.
prerequisite_modules_completedis the trap: the builder defaults it to false, and such a completion never leavespending. - seed_
fast_ πtrack_ near_ misses - The accounts that make the fast track not fire, one per reason it may refuse. Each holds a confirmed address, so what separates them is only the thing under test; the twin above is the unconfirmed case. None of them is given a completion: being on the registryβs roster is all it takes to be offered to the fast track.
- seed_
frozen_ πregistration - One student, one completion and one ledger row parked in
state. - seed_
grade_ πimprovement_ course - seed_
import_ πoutcomes_ course - One module per failing import shape, so the spec picks its error by picking a module rather than by flipping something every other spec on the course can see.
- seed_
linking_ πtokens emailed_tomatches no seeded account on purpose: tokens are unbound, and bind to whoever opens the link while logged in.- seed_
old_ πflow_ course - Owned by
suotar-old-flow-coexistence.spec.ts: student numbers9000010xx. - seed_
retry_ πcourse - Rows a teacher may put back on the queue and rows they may not.
- seed_
spec_ πaccount - The same, without a student number: whoever is meant to be discovered and mailed.
- seed_
spec_ πstudent - A user, an enrolment and a verified student number for one specβs actor.
- seed_
states_ πcourse - Every registration state, and every error code, as a frozen row.
- seed_
superseded_ πattempt_ pair - A registered grade-3 attempt superseded by a grade-4 one, so the admin-detail and grade-improvement specs get an attempt chain without driving a regrade first.