Fix some compile warnings (#2919)
* Fix some compile warnings * Some classes made final * JPA entities made not serializable Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -14,6 +14,7 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
|
||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.eclipse.hawkbit.auth.SpPermission;
|
||||
@@ -94,12 +95,11 @@ class PreAuthorizeEnabledTest extends AbstractSecurityTest {
|
||||
@Test
|
||||
@WithUser(authorities = { SpPermission.READ_TARGET }, autoCreateTenant = false)
|
||||
void onlyDSIfNoTenantConfig() throws Exception {
|
||||
mvc.perform(get("/rest/v1/system/configs"))
|
||||
.andExpect(result -> {
|
||||
// returns default DS type because of READ_TARGET
|
||||
assertThat(result.getResponse().getStatus()).isEqualTo(HttpStatus.OK.value());
|
||||
assertThat(new ObjectMapper().reader().readValue(result.getResponse().getContentAsString(), HashMap.class)).hasSize(1);
|
||||
});
|
||||
mvc.perform(get("/rest/v1/system/configs")).andExpect(result -> {
|
||||
// returns default DS type because of READ_TARGET
|
||||
assertThat(result.getResponse().getStatus()).isEqualTo(HttpStatus.OK.value());
|
||||
assertThat((Map<?, ?>) new ObjectMapper().reader().readValue(result.getResponse().getContentAsString(), HashMap.class)).hasSize(1);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user