PostNewAccount

2

tests

0

failures

0

ignored

2.951s

duration

100%

successful

Tests

Test Duration Result
shouldRejectCreatingAccountForNonNaturalPerson() 1.528s passed
shouldRejectCreatingAccountIfNotGlobalAdmin() 1.423s passed

Standard output

2026-08-10T16:29:39.326Z  INFO 374 --- [    Test worker] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [net.hostsharing.hsadminng.hs.accounts.HsAccountControllerAcceptanceTest$PostNewAccount]: PostNewAccount does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
2026-08-10T16:29:39.327Z  INFO 374 --- [    Test worker] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration net.hostsharing.hsadminng.HsadminNgApplication for test class net.hostsharing.hsadminng.hs.accounts.HsAccountControllerAcceptanceTest$PostNewAccount
ContextBasedTestWithCleanup.retrieveInitialTestData
shouldRejectCreatingAccountForNonNaturalPerson(): TOTAL OBJECT COUNT (initial): 210 -> 210
HTTP/1.1 400 
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:29:40 GMT
Connection: close

{
    "timestamp": "2026-08-10 04:29:40",
    "path": "",
    "statusCode": 400,
    "statusPhrase": "Bad Request",
    "message": "ERROR: [400] Nur natürliche Personen sind erlaubt, aber 51aa8be4-097b-4007-863d-136f7b9525c1 ist LEGAL_PERSON"
}
ContextBasedTestWithCleanup.cleanupAndCheckCleanup
shouldRejectCreatingAccountForNonNaturalPerson(): TOTAL OBJECT COUNT (after): 210 -> 210
ContextBasedTestWithCleanup.retrieveInitialTestData
shouldRejectCreatingAccountIfNotGlobalAdmin(): TOTAL OBJECT COUNT (initial): 210 -> 210
toCleanup(class net.hostsharing.hsadminng.hs.office.person.HsOfficePersonRealEntity, b32ab2ce-6101-411a-8603-197b0721f0a1
2026-08-10T16:29:41.810Z  WARN 374 --- [o-auto-1-exec-9] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: P0001
2026-08-10T16:29:41.811Z ERROR 374 --- [o-auto-1-exec-9] o.h.engine.jdbc.spi.SqlExceptionHelper   : ERROR: [403] subject tst-drew_selfregistered has no permission to assume role rbac.global#global:ADMIN
  Where: PL/pgSQL function rbac.determinecurrentsubjectorassumedrolesuuids(uuid[],text) line 49 at RAISE
PL/pgSQL function base.contextdefined(character varying,text,character varying,character varying,text) line 26 at assignment
SQL statement "call base.contextDefined(currentTask, currentRequest, currentSubject, assumedRoles, currentSubjectGroups)"
PL/pgSQL function base.definecontext(character varying,text,character varying,text,text) line 23 at CALL
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:29:41 GMT
Keep-Alive: timeout=60
Connection: keep-alive

{
    "timestamp": "2026-08-10 04:29:41",
    "path": "",
    "statusCode": 403,
    "statusPhrase": "Forbidden",
    "message": "ERROR: [403] Das Subjekt tst-drew_selfregistered hat keine Berechtigung, die Rolle rbac.global#global:ADMIN anzunehmen"
}
ContextBasedTestWithCleanup.cleanupAndCheckCleanup
DELETING temporary HsOfficePersonRealEntity#b32ab2ce-6101-411a-8603-197b0721f0a1 deleted 1 rows
shouldRejectCreatingAccountIfNotGlobalAdmin(): TOTAL OBJECT COUNT (after): 210 -> 210