DeleteDebitor
Tests
| Test |
Duration |
Result |
| contactAdminUser_canNotDeleteRelatedDebitor() |
1.433s |
passed |
| globalAdmin_withoutAssumedRole_canDeleteArbitraryDebitor() |
1.509s |
passed |
| normalUser_canNotDeleteUnrelatedDebitor() |
1.406s |
passed |
Standard output
ContextBasedTestWithCleanup.retrieveInitialTestData
globalAdmin_withoutAssumedRole_canDeleteArbitraryDebitor(): TOTAL OBJECT COUNT (initial): 210 -> 210
ContextBasedTestWithCleanup.cleanupAndCheckCleanup
globalAdmin_withoutAssumedRole_canDeleteArbitraryDebitor(): TOTAL OBJECT COUNT (after): 210 -> 210
ContextBasedTestWithCleanup.retrieveInitialTestData
contactAdminUser_canNotDeleteRelatedDebitor(): TOTAL OBJECT COUNT (initial): 210 -> 210
2026-08-10T15:05:28.805Z WARN 371 --- [o-auto-1-exec-6] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 0, SQLState: P0001
2026-08-10T15:05:28.805Z ERROR 371 --- [o-auto-1-exec-6] o.h.engine.jdbc.spi.SqlExceptionHelper : ERROR: [403] Subject {e14d7c89-c26f-598d-9a52-bb4da81520fc} is not allowed to delete hs_office.debitor uuid 9be86f95-0a49-4d94-8d35-406bed313c82
Where: PL/pgSQL function hs_office.debitor_instead_of_delete_tf() line 7 at RAISE
{
"timestamp": "2026-08-10 03:05:28",
"path": "",
"statusCode": 403,
"statusPhrase": "Forbidden",
"message": "ERROR: [403] Subject {e14d7c89-c26f-598d-9a52-bb4da81520fc} is not allowed to delete hs_office.debitor uuid 9be86f95-0a49-4d94-8d35-406bed313c82"
}
ContextBasedTestWithCleanup.cleanupAndCheckCleanup
2026-08-10T15:05:28.842Z WARN 371 --- [ Test worker] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 0, SQLState: 23503
2026-08-10T15:05:28.843Z ERROR 371 --- [ Test worker] o.h.engine.jdbc.spi.SqlExceptionHelper : ERROR: update or delete on table "relation" violates foreign key constraint "debitor_debitorreluuid_fkey" on table "debitor"
Detail: Key (uuid)=(93989575-f8c3-48c0-b97c-09965c71be4b) is still referenced from table "debitor".
DELETING leaked hs_office.relation#93989575-f8c3-48c0-b97c-09965c71be4b FAILED org.hibernate.exception.ConstraintViolationException: JDBC exception executing SQL [DELETE FROM hs_office.relation WHERE uuid=?] [ERROR: update or delete on table "relation" violates foreign key constraint "debitor_debitorreluuid_fkey" on table "debitor"
Detail: Key (uuid)=(93989575-f8c3-48c0-b97c-09965c71be4b) is still referenced from table "debitor".] [n/a]
DELETING leaked hs_office.debitor#9be86f95-0a49-4d94-8d35-406bed313c82 SUCCEEDED
contactAdminUser_canNotDeleteRelatedDebitor(): TOTAL OBJECT COUNT (after): 210 -> 210
ContextBasedTestWithCleanup.retrieveInitialTestData
normalUser_canNotDeleteUnrelatedDebitor(): TOTAL OBJECT COUNT (initial): 210 -> 210
ContextBasedTestWithCleanup.cleanupAndCheckCleanup
2026-08-10T15:05:30.282Z WARN 371 --- [ Test worker] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 0, SQLState: 23503
2026-08-10T15:05:30.282Z ERROR 371 --- [ Test worker] o.h.engine.jdbc.spi.SqlExceptionHelper : ERROR: update or delete on table "relation" violates foreign key constraint "debitor_debitorreluuid_fkey" on table "debitor"
Detail: Key (uuid)=(be1fdc97-65fb-476d-8826-dbd3e1a954f1) is still referenced from table "debitor".
DELETING leaked hs_office.relation#be1fdc97-65fb-476d-8826-dbd3e1a954f1 FAILED org.hibernate.exception.ConstraintViolationException: JDBC exception executing SQL [DELETE FROM hs_office.relation WHERE uuid=?] [ERROR: update or delete on table "relation" violates foreign key constraint "debitor_debitorreluuid_fkey" on table "debitor"
Detail: Key (uuid)=(be1fdc97-65fb-476d-8826-dbd3e1a954f1) is still referenced from table "debitor".] [n/a]
DELETING leaked hs_office.debitor#60808aaf-474a-4593-8474-b602fecd87de SUCCEEDED
normalUser_canNotDeleteUnrelatedDebitor(): TOTAL OBJECT COUNT (after): 210 -> 210