Merge branch 'origin/Extend_end-2-end_tests_for_full_DDI_roundtrip_with_Java_client' of local repository into Extend_end-2-end_tests_for_full_DDI_roundtrip_with_Java_client
This commit is contained in:
@@ -29,6 +29,7 @@ import org.springframework.cache.CacheManager;
|
|||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -54,7 +55,7 @@ public class SystemManagementResource implements SystemManagementRestApi {
|
|||||||
* @return HttpStatus.OK
|
* @return HttpStatus.OK
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ResponseEntity<Void> deleteTenant(final String tenant) {
|
public ResponseEntity<Void> deleteTenant(@PathVariable("tenant") final String tenant) {
|
||||||
systemManagement.deleteTenant(tenant);
|
systemManagement.deleteTenant(tenant);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.hateoas.ResourceSupport;
|
import org.springframework.hateoas.ResourceSupport;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -68,7 +70,7 @@ public class SystemResource implements SystemRestApi {
|
|||||||
* the response.
|
* the response.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ResponseEntity<Void> deleteConfigurationValue(final String keyName) {
|
public ResponseEntity<Void> deleteConfigurationValue(@PathVariable("keyName") final String keyName) {
|
||||||
|
|
||||||
final TenantConfigurationKey configKey = TenantConfigurationKey.fromKeyName(keyName);
|
final TenantConfigurationKey configKey = TenantConfigurationKey.fromKeyName(keyName);
|
||||||
|
|
||||||
@@ -89,7 +91,8 @@ public class SystemResource implements SystemRestApi {
|
|||||||
* response.
|
* response.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ResponseEntity<SystemTenantConfigurationValue> getConfigurationValue(final String keyName) {
|
public ResponseEntity<SystemTenantConfigurationValue> getConfigurationValue(
|
||||||
|
@PathVariable("keyName") final String keyName) {
|
||||||
|
|
||||||
final TenantConfigurationKey configKey = TenantConfigurationKey.fromKeyName(keyName);
|
final TenantConfigurationKey configKey = TenantConfigurationKey.fromKeyName(keyName);
|
||||||
|
|
||||||
@@ -111,8 +114,9 @@ public class SystemResource implements SystemRestApi {
|
|||||||
* response.
|
* response.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ResponseEntity<SystemTenantConfigurationValue> updateConfigurationValue(final String keyName,
|
public ResponseEntity<SystemTenantConfigurationValue> updateConfigurationValue(
|
||||||
final SystemTenantConfigurationValueRequest configurationValueRest) {
|
@PathVariable("keyName") final String keyName,
|
||||||
|
@RequestBody final SystemTenantConfigurationValueRequest configurationValueRest) {
|
||||||
|
|
||||||
final TenantConfigurationKey configKey = TenantConfigurationKey.fromKeyName(keyName);
|
final TenantConfigurationKey configKey = TenantConfigurationKey.fromKeyName(keyName);
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ public class SystemResourceTest extends AbstractIntegrationTest {
|
|||||||
final TenantConfigurationKey key = TenantConfigurationKey.AUTHENTICATION_MODE_HEADER_AUTHORITY_NAME;
|
final TenantConfigurationKey key = TenantConfigurationKey.AUTHENTICATION_MODE_HEADER_AUTHORITY_NAME;
|
||||||
final String testValue = "12:12:12";
|
final String testValue = "12:12:12";
|
||||||
|
|
||||||
mvc.perform(put(SystemRestConstant.SYSTEM_V1_REQUEST_MAPPING + "/configs/{keyName}", key.getKeyName())
|
mvc.perform(put(SystemRestConstant.SYSTEM_V1_REQUEST_MAPPING + "/configs/{keyName}/", key.getKeyName())
|
||||||
.content(String.format(BASE_JSON_REQUEST_STRING, testValue)).contentType(MediaType.APPLICATION_JSON))
|
.content(String.format(BASE_JSON_REQUEST_STRING, testValue)).contentType(MediaType.APPLICATION_JSON))
|
||||||
.andDo(MockMvcResultPrinter.print()).andExpect(status().isOk());
|
.andDo(MockMvcResultPrinter.print()).andExpect(status().isOk());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user