DeleteSubject

3

tests

0

failures

0

ignored

0.048s

duration

100%

successful

Tests

Test Duration Result
deleteByUuidByNonGlobalAdminIsRejectedByTheDatabase() 0.011s passed
deleteByUuidPhysicallyRemovesSubjectReferenceAndGrants() 0.017s passed
directlyDeletingTheSubjectRowAlsoDeletesItsReferenceAndGrants() 0.020s passed

Standard output

2026-08-10T16:40:55.281Z  INFO 369 --- [    Test worker] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [net.hostsharing.hsadminng.rbac.subject.RbacSubjectRepositoryIntegrationTest$DeleteSubject]: DeleteSubject does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
2026-08-10T16:40:55.283Z  INFO 369 --- [    Test worker] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration net.hostsharing.hsadminng.HsadminNgApplication for test class net.hostsharing.hsadminng.rbac.subject.RbacSubjectRepositoryIntegrationTest$DeleteSubject
Hibernate: call base.defineContext(
    cast(? as varchar(127)),
    cast(? as text),
    cast(? as varchar(63)),
    cast(? as text),
    cast(? as text));

Hibernate: insert into rbac.subject_rv (uuid, name, organization, type) values( ?, ?, ?, cast(? as rbac.SubjectType))
Hibernate: select * from rbac.subject where name=?
Hibernate: call base.defineContext(
    cast(? as varchar(127)),
    cast(? as text),
    cast(? as varchar(63)),
    cast(? as text),
    cast(? as text));

Hibernate: delete from rbac.reference where uuid = ?
2026-08-10T16:40:55.293Z  WARN 369 --- [    Test worker] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: P0001
2026-08-10T16:40:55.293Z ERROR 369 --- [    Test worker] o.h.engine.jdbc.spi.SqlExceptionHelper   : ERROR: [403] Subject tst-customer_admin_xxx not allowed to delete subject uuid 625cc7a4-50ba-45cd-86e1-2e7568302f23
  Where: PL/pgSQL function rbac.delete_grants_of_subject_tf() line 4 at RAISE
SQL statement "DELETE FROM ONLY "rbac"."subject" WHERE $1 OPERATOR(pg_catalog.=) "uuid""
Hibernate: select * from rbac.subject where name=?
Hibernate: call base.defineContext(
    cast(? as varchar(127)),
    cast(? as text),
    cast(? as varchar(63)),
    cast(? as text),
    cast(? as text));

Hibernate: insert into rbac.subject_rv (uuid, name, organization, type) values( ?, ?, ?, cast(? as rbac.SubjectType))
Hibernate: select * from rbac.subject where name=?
Hibernate: call base.defineContext(
    cast(? as varchar(127)),
    cast(? as text),
    cast(? as varchar(63)),
    cast(? as text),
    cast(? as text));

Hibernate: select r.uuid
  from rbac.role r
  join rbac.object o on o.uuid = r.objectuuid
 where o.objecttable = 'rbactest.package' and r.roletype = 'TENANT'
 limit 1

Hibernate: call rbac.grantRoleToSubjectUnchecked(?, ?, ?)
Hibernate: call base.defineContext(
    cast(? as varchar(127)),
    cast(? as text),
    cast(? as varchar(63)),
    cast(? as text),
    cast(? as text));

Hibernate: select count(*) from rbac.grant where ascendantuuid = ? or descendantuuid = ?
Hibernate: call base.defineContext(
    cast(? as varchar(127)),
    cast(? as text),
    cast(? as varchar(63)),
    cast(? as text),
    cast(? as text));

Hibernate: delete from rbac.subject where uuid = ?
Hibernate: select * from rbac.subject where name=?
Hibernate: call base.defineContext(
    cast(? as varchar(127)),
    cast(? as text),
    cast(? as varchar(63)),
    cast(? as text),
    cast(? as text));

Hibernate: select count(*) from rbac.reference where uuid = ?
Hibernate: call base.defineContext(
    cast(? as varchar(127)),
    cast(? as text),
    cast(? as varchar(63)),
    cast(? as text),
    cast(? as text));

Hibernate: select count(*) from rbac.grant where ascendantuuid = ? or descendantuuid = ?
Hibernate: call base.defineContext(
    cast(? as varchar(127)),
    cast(? as text),
    cast(? as varchar(63)),
    cast(? as text),
    cast(? as text));

Hibernate: insert into rbac.subject_rv (uuid, name, organization, type) values( ?, ?, ?, cast(? as rbac.SubjectType))
Hibernate: select * from rbac.subject where name=?
Hibernate: call base.defineContext(
    cast(? as varchar(127)),
    cast(? as text),
    cast(? as varchar(63)),
    cast(? as text),
    cast(? as text));

Hibernate: select r.uuid
  from rbac.role r
  join rbac.object o on o.uuid = r.objectuuid
 where o.objecttable = 'rbactest.package' and r.roletype = 'TENANT'
 limit 1

Hibernate: call rbac.grantRoleToSubjectUnchecked(?, ?, ?)
Hibernate: call base.defineContext(
    cast(? as varchar(127)),
    cast(? as text),
    cast(? as varchar(63)),
    cast(? as text),
    cast(? as text));

Hibernate: select count(*) from rbac.grant where ascendantuuid = ? or descendantuuid = ?
Hibernate: call base.defineContext(
    cast(? as varchar(127)),
    cast(? as text),
    cast(? as varchar(63)),
    cast(? as text),
    cast(? as text));

Hibernate: delete from rbac.reference where uuid = ?
Hibernate: select * from rbac.subject where name=?
Hibernate: call base.defineContext(
    cast(? as varchar(127)),
    cast(? as text),
    cast(? as varchar(63)),
    cast(? as text),
    cast(? as text));

Hibernate: select count(*) from rbac.reference where uuid = ?
Hibernate: call base.defineContext(
    cast(? as varchar(127)),
    cast(? as text),
    cast(? as varchar(63)),
    cast(? as text),
    cast(? as text));

Hibernate: select count(*) from rbac.grant where ascendantuuid = ? or descendantuuid = ?