PatchDebitor

2

tests

0

failures

0

ignored

2.716s

duration

100%

successful

Tests

Test Duration Result
globalAdmin_withoutAssumedRole_canPatchArbitraryDebitor() 1.321s passed
theContactAdmin_canNotPatchARelatedDebitor() 1.395s passed

Standard output

ContextBasedTestWithCleanup.retrieveInitialTestData
theContactAdmin_canNotPatchARelatedDebitor(): TOTAL OBJECT COUNT (initial): 210 -> 210
2026-08-10T16:39:22.967Z  WARN 380 --- [o-auto-1-exec-2] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: P0001
2026-08-10T16:39:22.968Z ERROR 380 --- [o-auto-1-exec-2] o.h.engine.jdbc.spi.SqlExceptionHelper   : ERROR: [403] Subject {7b6b8eb7-e2d2-43ba-accc-eefc461301e4} is not allowed to update hs_office.debitor uuid 4c81ec28-bc5f-44ef-8722-8a332d8bcc57
  Where: PL/pgSQL function hs_office.debitor_instead_of_update_tf() line 18 at RAISE
HTTP/1.1 403 
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Type: application/json
Transfer-Encoding: chunked
Date: Mon, 10 Aug 2026 16:39:22 GMT
Keep-Alive: timeout=60
Connection: keep-alive

{
    "timestamp": "2026-08-10 04:39:22",
    "path": "",
    "statusCode": 403,
    "statusPhrase": "Forbidden",
    "message": "ERROR: [403] Subject {7b6b8eb7-e2d2-43ba-accc-eefc461301e4} is not allowed to update hs_office.debitor uuid 4c81ec28-bc5f-44ef-8722-8a332d8bcc57"
}
ContextBasedTestWithCleanup.cleanupAndCheckCleanup
2026-08-10T16:39:23.027Z  WARN 380 --- [    Test worker] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: 23503
2026-08-10T16:39:23.028Z 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)=(06ce2d1c-7f45-494d-be96-41e1e32f3977) is still referenced from table "debitor".
DELETING leaked hs_office.relation#06ce2d1c-7f45-494d-be96-41e1e32f3977 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)=(06ce2d1c-7f45-494d-be96-41e1e32f3977) is still referenced from table "debitor".] [n/a]
DELETING leaked hs_office.debitor#4c81ec28-bc5f-44ef-8722-8a332d8bcc57 SUCCEEDED
theContactAdmin_canNotPatchARelatedDebitor(): TOTAL OBJECT COUNT (after): 210 -> 210
ContextBasedTestWithCleanup.retrieveInitialTestData
globalAdmin_withoutAssumedRole_canPatchArbitraryDebitor(): TOTAL OBJECT COUNT (initial): 210 -> 210
HTTP/1.1 200 
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Type: application/json
Transfer-Encoding: chunked
Date: Mon, 10 Aug 2026 16:39:24 GMT
Keep-Alive: timeout=60
Connection: keep-alive

{
    "uuid": "9ac66a1a-7045-4a29-a6cc-c045c6fa4210",
    "debitorRel": {
        "uuid": "59551b50-5558-4b08-80bc-5291eadc641d",
        "anchor": {
            "uuid": "60f14923-28d0-4c1f-983e-4bf0224dc4e4",
            "personType": "LEGAL_PERSON",
            "tradeName": "Fourth eG",
            "salutation": null,
            "title": null,
            "givenName": null,
            "familyName": null
        },
        "holder": {
            "uuid": "60f14923-28d0-4c1f-983e-4bf0224dc4e4",
            "personType": "LEGAL_PERSON",
            "tradeName": "Fourth eG",
            "salutation": null,
            "title": null,
            "givenName": null,
            "familyName": null
        },
        "type": "DEBITOR",
        "mark": null,
        "contact": {
            "uuid": "89d27f59-18de-443a-8ca5-aa44654ab212",
            "caption": "tenth contact",
            "postalAddress": {
                "country": "Germany"
            },
            "emailAddresses": {
                "main": "contact-admin@tenthcontact.example.com"
            },
            "phoneNumbers": {
                "phone_office": "+49 123 1234567"
            }
        }
    },
    "debitorNumber": "D-1000494",
    "debitorNumberSuffix": "94",
    "partner": {
        "uuid": "ed2502ed-63e7-415f-b7f6-16aa23a8997d",
        "partnerNumber": "P-10004",
        "partnerRel": {
            "uuid": "8caf586d-adc8-4db4-b8a7-ae1d83db99ee",
            "anchor": {
                "uuid": "cdee26c7-a241-4a3c-99cc-1138917c252b",
                "personType": "LEGAL_PERSON",
                "tradeName": "Hostsharing eG",
                "salutation": null,
                "title": null,
                "givenName": null,
                "familyName": null
            },
            "holder": {
                "uuid": "60f14923-28d0-4c1f-983e-4bf0224dc4e4",
                "personType": "LEGAL_PERSON",
                "tradeName": "Fourth eG",
                "salutation": null,
                "title": null,
                "givenName": null,
                "familyName": null
            },
            "type": "PARTNER",
            "mark": null,
            "contact": {
                "uuid": "962d5cd8-ed42-44d8-9457-ce769697d113",
                "caption": "fourth contact",
                "postalAddress": {
                    "country": "Germany"
                },
                "emailAddresses": {
                    "main": "contact-admin@fourthcontact.example.com"
                },
                "phoneNumbers": {
                    "phone_office": "+49 123 1234567"
                }
            }
        },
        "details": {
            "uuid": "2f4fdbb3-3b39-4a7c-ab78-826a439c0e8a",
            "registrationOffice": "Hamburg",
            "registrationNumber": "RegNo123456789",
            "birthName": null,
            "birthPlace": null,
            "birthday": null,
            "dateOfDeath": null
        }
    },
    "billable": true,
    "vatId": "VAT222222",
    "vatCountryCode": "AA",
    "vatBusiness": true,
    "vatReverseCharge": false,
    "refundBankAccount": null,
    "defaultPrefix": "for"
}
ContextBasedTestWithCleanup.cleanupAndCheckCleanup
2026-08-10T16:39:24.341Z  WARN 380 --- [    Test worker] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: 23503
2026-08-10T16:39:24.341Z 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)=(59551b50-5558-4b08-80bc-5291eadc641d) is still referenced from table "debitor".
DELETING leaked hs_office.relation#59551b50-5558-4b08-80bc-5291eadc641d 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)=(59551b50-5558-4b08-80bc-5291eadc641d) is still referenced from table "debitor".] [n/a]
DELETING leaked hs_office.debitor#9ac66a1a-7045-4a29-a6cc-c045c6fa4210 SUCCEEDED
globalAdmin_withoutAssumedRole_canPatchArbitraryDebitor(): TOTAL OBJECT COUNT (after): 210 -> 210