Sonar Fixes (#2231)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -38,11 +38,11 @@ import org.springframework.data.domain.Slice;
|
||||
@Feature("Component Tests - Repository")
|
||||
@Story("Multi Tenancy")
|
||||
@ExtendWith(DisposableSqlTestDatabaseExtension.class)
|
||||
public class MultiTenancyEntityTest extends AbstractJpaIntegrationTest {
|
||||
class MultiTenancyEntityTest extends AbstractJpaIntegrationTest {
|
||||
|
||||
@Test
|
||||
@Description(value = "Ensures that multiple targets with same controller-ID can be created for different tenants.")
|
||||
public void createMultipleTargetsWithSameIdForDifferentTenant() throws Exception {
|
||||
void createMultipleTargetsWithSameIdForDifferentTenant() throws Exception {
|
||||
// known controller ID for overall tenants same
|
||||
final String knownControllerId = "controllerId";
|
||||
|
||||
@@ -64,9 +64,9 @@ public class MultiTenancyEntityTest extends AbstractJpaIntegrationTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Description(value = "Ensures that targtes created by a tenant are not visible by another tenant.")
|
||||
@Description(value = "Ensures that targets created by a tenant are not visible by another tenant.")
|
||||
@WithUser(tenantId = "mytenant", allSpPermissions = true)
|
||||
public void queryTargetFromDifferentTenantIsNotVisible() throws Exception {
|
||||
void queryTargetFromDifferentTenantIsNotVisible() throws Exception {
|
||||
// create target for another tenant
|
||||
final String anotherTenant = "anotherTenant";
|
||||
final String controllerAnotherTenant = "anotherController";
|
||||
@@ -86,7 +86,7 @@ public class MultiTenancyEntityTest extends AbstractJpaIntegrationTest {
|
||||
@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 {
|
||||
void deleteAnotherTenantPossible() throws Exception {
|
||||
// create target for another tenant
|
||||
final String anotherTenant = "anotherTenant";
|
||||
final String controllerAnotherTenant = "anotherController";
|
||||
@@ -102,7 +102,7 @@ public class MultiTenancyEntityTest extends AbstractJpaIntegrationTest {
|
||||
@Test
|
||||
@Description(value = "Ensures that tenant metadata is retrieved for the current tenant.")
|
||||
@WithUser(tenantId = "mytenant", autoCreateTenant = false, allSpPermissions = true)
|
||||
public void getTenanatMetdata() throws Exception {
|
||||
void getTenanatMetdata() throws Exception {
|
||||
|
||||
// logged in tenant mytenant - check if tenant default data is
|
||||
// autogenerated
|
||||
@@ -122,7 +122,7 @@ public class MultiTenancyEntityTest extends AbstractJpaIntegrationTest {
|
||||
@Test
|
||||
@Description(value = "Ensures that targets created from a different tenant cannot be deleted from other tenants")
|
||||
@WithUser(tenantId = "mytenant", allSpPermissions = true)
|
||||
public void deleteTargetFromOtherTenantIsNotPossible() throws Exception {
|
||||
void deleteTargetFromOtherTenantIsNotPossible() throws Exception {
|
||||
// create target for another tenant
|
||||
final String anotherTenant = "anotherTenant";
|
||||
final String controllerAnotherTenant = "anotherController";
|
||||
@@ -147,7 +147,7 @@ public class MultiTenancyEntityTest extends AbstractJpaIntegrationTest {
|
||||
|
||||
@Test
|
||||
@Description(value = "Ensures that multiple distribution sets with same name and version can be created for different tenants.")
|
||||
public void createMultipleDistributionSetsWithSameNameForDifferentTenants() throws Exception {
|
||||
void createMultipleDistributionSetsWithSameNameForDifferentTenants() throws Exception {
|
||||
|
||||
// known tenant names
|
||||
final String tenant = "aTenant";
|
||||
|
||||
Reference in New Issue
Block a user