Test tenant bootstrap – system description
The steps of the test bootstrap on the regular operating paths, idempotency, the state query and the super-administrator-only access.
Overview
Builds a test tenant from scratch on the regular operating paths (company model, Dlbtclient, Dlbtprovision), without own SQL, idempotently. Table names carry the installation's own prefix in the database.
Run steps (bootstrap.run)
- Company group by name.
- Client company: searched by exact name, otherwise
addCompany; NAV row. - User in the given user group;
attachUserToClient; check of the content scope. - Subscription: with an existing open one the period is activated (
activateSubscriptionPeriod), otherwise a new active subscription (addActiveClientSubscription). syncClientPlan().
bootstrap.state returns the state and limits (Dlbtclient::limits) of the client found by tax number prefix. Data touched: company_group, company, base user table, subscription_account, subscription, user_feature.
Permissions
In the seed bootstrap::list and bootstrap::run are SYSTEM, but the controller does not ask for them: every endpoint requires isSuper(), and the menu item is shown to the super administrator only.