DeleteDebitor

3

tests

0

failures

0

ignored

3.825s

duration

100%

successful

Tests

Test Duration Result
contactAdminUser_canNotDeleteRelatedDebitor() 1.286s passed
globalAdmin_withoutAssumedRole_canDeleteArbitraryDebitor() 1.276s passed
normalUser_canNotDeleteUnrelatedDebitor() 1.263s 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-10T16:31:20.386Z  WARN 382 --- [o-auto-1-exec-3] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: P0001
2026-08-10T16:31:20.386Z ERROR 382 --- [o-auto-1-exec-3] o.h.engine.jdbc.spi.SqlExceptionHelper   : ERROR: [403] Subject {e14d7c89-c26f-598d-9a52-bb4da81520fc} is not allowed to delete hs_office.debitor uuid e52fffd1-0377-4fb7-bb75-e15072655477
  Where: PL/pgSQL function hs_office.debitor_instead_of_delete_tf() line 7 at RAISE
{
    "timestamp": "2026-08-10 04:31:20",
    "path": "",
    "statusCode": 403,
    "statusPhrase": "Forbidden",
    "message": "ERROR: [403] Subject {e14d7c89-c26f-598d-9a52-bb4da81520fc} is not allowed to delete hs_office.debitor uuid e52fffd1-0377-4fb7-bb75-e15072655477"
}
ContextBasedTestWithCleanup.cleanupAndCheckCleanup
2026-08-10T16:31:20.409Z  WARN 382 --- [    Test worker] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: 23503
2026-08-10T16:31:20.409Z ERROR 382 --- [    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)=(2e44e0f9-e906-4637-98e5-00ffb37c5e95) is still referenced from table "debitor".
DELETING leaked hs_office.relation#2e44e0f9-e906-4637-98e5-00ffb37c5e95 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)=(2e44e0f9-e906-4637-98e5-00ffb37c5e95) is still referenced from table "debitor".] [n/a]
DELETING leaked hs_office.debitor#e52fffd1-0377-4fb7-bb75-e15072655477 SUCCEEDED
contactAdminUser_canNotDeleteRelatedDebitor(): TOTAL OBJECT COUNT (after): 210 -> 210
ContextBasedTestWithCleanup.retrieveInitialTestData
normalUser_canNotDeleteUnrelatedDebitor(): TOTAL OBJECT COUNT (initial): 210 -> 210

ContextBasedTestWithCleanup.cleanupAndCheckCleanup
2026-08-10T16:31:21.672Z  WARN 382 --- [    Test worker] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: 23503
2026-08-10T16:31:21.672Z ERROR 382 --- [    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)=(0389cd78-6bab-404a-9488-374817bcae87) is still referenced from table "debitor".
DELETING leaked hs_office.relation#0389cd78-6bab-404a-9488-374817bcae87 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)=(0389cd78-6bab-404a-9488-374817bcae87) is still referenced from table "debitor".] [n/a]
DELETING leaked hs_office.debitor#8a5ef0eb-d634-4b84-839b-a772fd24dd5d SUCCEEDED
normalUser_canNotDeleteUnrelatedDebitor(): TOTAL OBJECT COUNT (after): 210 -> 210