|
ORE Studio 0.0.4
|
Provides database setup and cleanup utilities for tests. More...
#include <database_helper.hpp>

Public Member Functions | |
| void | seed_rbac () |
| Seeds minimal RBAC data for tests. | |
| void | set_tenant_context () |
| Sets the tenant context for tests. | |
| database::context & | context () |
| Gets the database context. | |
| utility::uuid::tenant_id | tenant_id () |
| Gets the test tenant ID. | |
| std::string | db_user () |
| Gets the database user for the current connection. | |
Provides database setup and cleanup utilities for tests.
| void seed_rbac | ( | ) |
Seeds minimal RBAC data for tests.
Creates the essential permissions and roles needed for IAM tests:
This is idempotent - safe to call multiple times.

| void set_tenant_context | ( | ) |
Sets the tenant context for tests.
Uses the test tenant ID from the environment variable if set (set by database_lifecycle_listener), otherwise falls back to the system tenant.