RED-9872: Tenant Management issues
This commit is contained in:
parent
529669533e
commit
87e1493de9
@ -23,10 +23,6 @@ import lombok.NoArgsConstructor;
|
||||
@Schema(description = "Object containing the request to update a tenant.")
|
||||
public class UpdateTenantRequest {
|
||||
|
||||
@NotBlank
|
||||
@Pattern(regexp = "[A-Za-z0-9_-]*", message = "Tenant Id must match [A-Za-z0-9_-]")
|
||||
@Schema(description = "Parameter containing the ID of the tenant.")
|
||||
private String tenantId;
|
||||
@NotBlank
|
||||
@Schema(description = "Parameter containing the display name of the tenant.")
|
||||
private String displayName;
|
||||
|
||||
@ -767,17 +767,17 @@ public class TenantManagementService implements TenantProvider {
|
||||
.build());
|
||||
}
|
||||
|
||||
propagateTenantToKeyCloak(tenantRequest.getTenantId(), null);
|
||||
propagateTenantToKeyCloak(tenantId, null);
|
||||
|
||||
TenantResponse tenantResponse = convert(tenantRepository.save(tenantEntity));
|
||||
|
||||
log.info("Persisted tenant update: {}", tenantRequest.getTenantId());
|
||||
log.info("Persisted tenant update: {}", tenantId);
|
||||
|
||||
TenantContext.setTenantId(tenantEntity.getTenantId());
|
||||
rabbitTemplate.convertAndSend(tenantExchangeName, "tenant.updated", tenantResponse);
|
||||
TenantContext.clear();
|
||||
|
||||
log.info("Dispatched message for tenant: {}", tenantRequest.getTenantId());
|
||||
log.info("Dispatched message for tenant: {}", tenantId);
|
||||
|
||||
return tenantResponse;
|
||||
|
||||
|
||||
@ -70,7 +70,6 @@ public class TenantsTest extends AbstractTenantUserManagementIntegrationTest {
|
||||
TenantContext.setTenantId(tenantId);
|
||||
|
||||
var tenantRequest = UpdateTenantRequest.builder()
|
||||
.tenantId(tenantId)
|
||||
.displayName("updated_display_name")
|
||||
.searchConnection(SearchConnectionRequest.builder()
|
||||
.numberOfReplicas("1")
|
||||
@ -161,7 +160,6 @@ public class TenantsTest extends AbstractTenantUserManagementIntegrationTest {
|
||||
TenantContext.setTenantId("new_tenant");
|
||||
|
||||
var tenantRequest = UpdateTenantRequest.builder()
|
||||
.tenantId("new_tenant")
|
||||
.s3StorageConnection(S3StorageConnection.builder()
|
||||
.key("updated_key")
|
||||
.bucketName("updated_bucket")
|
||||
@ -186,7 +184,6 @@ public class TenantsTest extends AbstractTenantUserManagementIntegrationTest {
|
||||
TenantContext.setTenantId("new_tenant_without_storage");
|
||||
|
||||
var tenantRequest = UpdateTenantRequest.builder()
|
||||
.tenantId("new_tenant_without_storage")
|
||||
.azureStorageConnection(AzureStorageConnection.builder().connectionString("updated_connection").containerName("updated_container").build())
|
||||
.build();
|
||||
|
||||
@ -204,7 +201,6 @@ public class TenantsTest extends AbstractTenantUserManagementIntegrationTest {
|
||||
TenantContext.setTenantId("new_tenant");
|
||||
|
||||
var tenantRequest = UpdateTenantRequest.builder()
|
||||
.tenantId("new_tenant")
|
||||
.azureStorageConnection(AzureStorageConnection.builder().connectionString("updated_connection").containerName("updated_container").build())
|
||||
.s3StorageConnection(S3StorageConnection.builder()
|
||||
.key("updated_key")
|
||||
@ -230,7 +226,6 @@ public class TenantsTest extends AbstractTenantUserManagementIntegrationTest {
|
||||
TenantContext.setTenantId("new_tenant_with_s3");
|
||||
|
||||
var tenantRequest = UpdateTenantRequest.builder()
|
||||
.tenantId("new_tenant_with_s3")
|
||||
.azureStorageConnection(AzureStorageConnection.builder().connectionString("updated_connection").containerName("updated_container").build())
|
||||
.build();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user