|
ORE Studio 0.0.4
|
Provides database context for tests with optional RBAC seeding. More...
#include <scoped_database_helper.hpp>

Public Member Functions | |
| scoped_database_helper (bool seed_rbac=false) | |
| Constructs a scoped database helper. | |
| void | seed_rbac () |
| Seeds minimal RBAC data 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 context for tests with optional RBAC seeding.
Each test run uses an isolated tenant, so no table truncation is needed.
|
explicit |
Constructs a scoped database helper.
| seed_rbac | If true, seeds minimal RBAC data (Admin role with wildcard permission) |
| void seed_rbac | ( | ) |
Seeds minimal RBAC data for tests.
Call this if you need RBAC data but didn't pass seed_rbac=true to constructor.
