DeleteDebitor

3

tests

0

failures

0

ignored

4.240s

duration

100%

successful

Tests

Test Duration Result
contactAdminUser_canNotDeleteRelatedDebitor() 1.447s passed
globalAdmin_withoutAssumedRole_canDeleteArbitraryDebitor() 1.511s passed
normalUser_canNotDeleteUnrelatedDebitor() 1.282s 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:39:20.274Z  WARN 380 --- [o-auto-1-exec-8] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: P0001
2026-08-10T16:39:20.274Z ERROR 380 --- [o-auto-1-exec-8] o.h.engine.jdbc.spi.SqlExceptionHelper   : ERROR: [403] Subject {e14d7c89-c26f-598d-9a52-bb4da81520fc} is not allowed to delete hs_office.debitor uuid 9fb37663-da89-46c4-9497-028e03f54dce
  Where: PL/pgSQL function hs_office.debitor_instead_of_delete_tf() line 7 at RAISE
{
    "timestamp": "2026-08-10 04:39:20",
    "path": "",
    "statusCode": 403,
    "statusPhrase": "Forbidden",
    "message": "ERROR: [403] Subject {e14d7c89-c26f-598d-9a52-bb4da81520fc} is not allowed to delete hs_office.debitor uuid 9fb37663-da89-46c4-9497-028e03f54dce"
}
ContextBasedTestWithCleanup.cleanupAndCheckCleanup
2026-08-10T16:39:20.313Z  WARN 380 --- [    Test worker] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: 23503
2026-08-10T16:39:20.313Z ERROR 380 --- [    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)=(62d22c2a-07d1-4f9f-b6bb-ca363b91f0dc) is still referenced from table "debitor".
DELETING leaked hs_office.relation#62d22c2a-07d1-4f9f-b6bb-ca363b91f0dc 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)=(62d22c2a-07d1-4f9f-b6bb-ca363b91f0dc) is still referenced from table "debitor".] [n/a]
DELETING leaked hs_office.debitor#9fb37663-da89-46c4-9497-028e03f54dce SUCCEEDED
contactAdminUser_canNotDeleteRelatedDebitor(): TOTAL OBJECT COUNT (after): 210 -> 210
ContextBasedTestWithCleanup.retrieveInitialTestData
normalUser_canNotDeleteUnrelatedDebitor(): TOTAL OBJECT COUNT (initial): 210 -> 210

ContextBasedTestWithCleanup.cleanupAndCheckCleanup
2026-08-10T16:39:21.610Z  WARN 380 --- [    Test worker] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: 23503
2026-08-10T16:39:21.610Z ERROR 380 --- [    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)=(9351af37-ea46-4f26-bd3c-bf6b2cf5c8e9) is still referenced from table "debitor".
DELETING leaked hs_office.relation#9351af37-ea46-4f26-bd3c-bf6b2cf5c8e9 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)=(9351af37-ea46-4f26-bd3c-bf6b2cf5c8e9) is still referenced from table "debitor".] [n/a]
DELETING leaked hs_office.debitor#980adadb-6efd-40db-9dfa-5a9b0c2ba8e6 SUCCEEDED
normalUser_canNotDeleteUnrelatedDebitor(): TOTAL OBJECT COUNT (after): 210 -> 210