DeleteSubject

3

tests

0

failures

0

ignored

0.093s

duration

100%

successful

Tests

Test Duration Result
deleteByUuidByNonGlobalAdminIsRejectedByTheDatabase() 0.016s passed
deleteByUuidPhysicallyRemovesSubjectReferenceAndGrants() 0.033s passed
directlyDeletingTheSubjectRowAlsoDeletesItsReferenceAndGrants() 0.044s passed

Standard output

2026-08-10T13:36:22.384Z  INFO 370 --- [    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-10T13:36:22.387Z  INFO 370 --- [    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-10T13:36:22.402Z  WARN 370 --- [    Test worker] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: P0001
2026-08-10T13:36:22.402Z ERROR 370 --- [    Test worker] o.h.engine.jdbc.spi.SqlExceptionHelper   : ERROR: [403] Subject tst-customer_admin_xxx not allowed to delete subject uuid 1e0db8be-a779-41e1-876d-8645a946ca87
  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 = ?