Acceptance and reference-environment test utilities for ShariX Open, including demo audit/reset and schema consistency checks.
Набор средств приёмочного тестирования и проверки эталонной среды ShariX Open, включая аудит и сброс demo-сценария и контроль согласованности схемы.
|
|
1 month ago | |
|---|---|---|
| legacy_migrations | 1 month ago | |
| lib | 1 month ago | |
| management | 1 month ago | |
| migrations | 1 month ago | |
| scenarios | 1 month ago | |
| templates | 5 months ago | |
| tests | 1 month ago | |
| .gitignore | 1 month ago | |
| CODING_POLICY.md | 1 month ago | |
| LICENSE | 1 month ago | |
| README.md | 1 month ago | |
| RELEASE_POLICY.md | 1 month ago | |
| __init__.py | 5 months ago | |
| apps.py | 5 months ago | |
| models.py | 5 months ago | |
| services.py | 5 months ago | |
| sharix_health.py | 1 month ago | |
| sharix_management.py | 1 month ago | |
| sharix_pages.py | 1 month ago | |
| urls.py | 5 months ago | |
| views.py | 5 months ago |
When testkit models are installed, their schema is owned by committed canonical migrations. Stage 7.6.6 can create the one-time baseline in the authoritative Open checkout; production install/start code never runs makemigrations.
Scenario reference_demo_environment is a Stage 8 acceptance scenario. On a
positive METASERVICE_ID it records a clean skip. On METASERVICE_ID=0 it
runs the production read-only reference audit, checks that namespace 0 has no
Platform sync journal/state, verifies the local no-money payment backend and
login switch semantics, and exercises the production bootstrap inside a
rollback-only transaction to detect duplicate/stable-key regressions. Testkit
does not own or persist the reference fixtures.
Testkit exposes one canonical reset entry point for the Stage 8 training namespace:
./venv/bin/python manage.py reset_demo_reference_environment --yes
The command is destructive only for rows provably owned by the canonical Stage 8
reference identities and only when METASERVICE_ID=0. It does not wipe arbitrary
namespace-0 rows, schemas, migrations, source repositories, secrets or installation
configuration. A normal positive-ID Platform installation fails closed before any
reset work; even a misconfigured Platform exposing id 0 returns an explicit no-op
because Platform does not own Open demo business data.
The database part removes mutable runtime descendants of reference users (orders and
execution/payment descendants, reference appointment instances, mutable
provider/resource/check/document state) and deletes file-backed onboarding projects
owned by reference users. It then calls the production-owned
reset_demo_reference_stage84() / Stage 8 ensure+audit. The LDAP part uses
bin/sync_ldap_from_ldif.sh to restore safe profile attributes
and canonical reference-user role memberships. Passwords are intentionally preserved
by the existing LDAP recovery policy.
Installer flags now have real behavior and share the same service:
TESTKIT_DELETE_LDIF_USER_DATA_ON_INSTALL=true resets database-side demo runtime;TESTKIT_RESET_LDIF_USERS_ON_INSTALL=true reconciles reference LDAP users/groups;A positive METASERVICE_ID fails closed if either destructive reset flag is enabled.
Scenario service_onboarding_launch is a read-only Stage 9.4 acceptance check.
It skips cleanly when sharix_onboarding is not installed (including Platform
assemblies) or when no project has completed launch yet. For completed launch
results it verifies that the recorded first order still exists and that the
materialized service set has at least one active Provider offer. Testkit never
creates launch business data and remains optional.
run_ui_smoke remains read-only. It never creates Orders, requirement tickets or
other business objects merely to satisfy a route fixture. When a case has an
object-bound fixture and its persona is not pinned through
SHARIX_UI_SMOKE_PERSONAS, Testkit checks active users matching the persona groups
in deterministic group/primary-key order and uses the first user for whom the
fixture resolver finds a stable object. This avoids coupling strict smoke to the
first member of a role group when another valid test persona owns the fixture.
An explicit SHARIX_UI_SMOKE_PERSONAS entry is authoritative: Testkit checks only
that configured user and fails/skips according to the requested strict mode rather
than silently substituting another account.