Removed the method exception from transaction manager as they where not
needed anymore. The bean in systemmanagement should also not open a transaction. Signed-off-by: Kai Zimmermann <kai.zimmermann@bosch-si.com>
This commit is contained in:
@@ -78,6 +78,22 @@ public class MultiTenancyEntityTest extends AbstractIntegrationTest {
|
||||
assertThat(findTargetsForTenant).hasSize(1);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Description(value = "Ensures that tenant with proper permissions can read and delete other tenants.")
|
||||
@WithUser(tenantId = "mytenant", allSpPermissions = true)
|
||||
public void deleteAnotherTenantPossible() throws Exception {
|
||||
// create target for another tenant
|
||||
final String anotherTenant = "anotherTenant";
|
||||
final String controllerAnotherTenant = "anotherController";
|
||||
createTargetForTenant(controllerAnotherTenant, anotherTenant);
|
||||
|
||||
assertThat(systemManagement.findTenants()).as("Expected number if tenants before deletion is").hasSize(3);
|
||||
|
||||
systemManagement.deleteTenant(anotherTenant);
|
||||
|
||||
assertThat(systemManagement.findTenants()).as("Expected number if tenants after deletion is").hasSize(2);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Description(value = "Ensures that tenant metadata is retrieved for the current tenant.")
|
||||
@WithUser(tenantId = "mytenant", autoCreateTenant = false, allSpPermissions = true)
|
||||
|
||||
Reference in New Issue
Block a user