1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-06-21 05:04:04 +00:00
Commit graph

10 commits

Author SHA1 Message Date
lukinovec
0d177c7e9b Use simple tenants table check during hardening
For a niche opt-in feature, checking if the tenants table is in the current schema is good enough for determining if the current DB is central -- the solution where we added getCurrentDatabaseName to each manager was overly complicated for this (though a bit more correct, not worth the added complexity).
2026-06-12 15:34:39 +02:00
lukinovec
34d19e94e2 Make hardening work with all db/schema managers
Previously, hardening only worked with databases, not with schemas. Also test that hardening works with all relevant db managers.
2026-06-10 13:21:41 +02:00
lukinovec
540e3635e2 Improve hardening
Make hardening work correctly even for named SQLite DBs, also make the related test test named SQLite DBs instead of just MySQL (the SQLite dataset fails when the DatabaseTenancyBootstrapper changes get reverted).
2026-06-09 09:56:02 +02:00
lukinovec
49356a5513 Use more specific exception assertions 2026-06-08 11:37:06 +02:00
lukinovec
407197b190 Use datasets in hardening tests 2026-06-08 11:26:07 +02:00
lukinovec
b1f0d0a43c
Get central DB from config in harden test
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-05-01 12:34:28 +02:00
lukinovec
0ce3d863ce DATABASE_URL test: set config for both datasets 2026-05-01 12:11:00 +02:00
lukinovec
52f6857302 If harden throws an exception, revert connection back to central 2026-05-01 12:08:02 +02:00
lukinovec
f5f5f1d4aa Fix DB bootstrapper test
"database tenancy bootstrapper throws an exception if DATABASE_URL is set" was failing with the null $databaseUrl because the tenant DB was never created. This test was ignored during test runs because the test file lacked the 'Test' suffix.
2026-05-01 11:53:27 +02:00
lukinovec
fbd1e02564 Correct DatabaseTenancyBootstrapper test filename
DatabaseTenancyBootstrapper is ignored by ./t, it should be suffixed with 'Test'.
2026-05-01 11:50:01 +02:00
Renamed from tests/Bootstrappers/DatabaseTenancyBootstrapper.php (Browse further)