mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 06:07:57 +01:00
Test 100%
This commit is contained in:
parent
e28302236b
commit
f86f96a35e
@ -18,7 +18,7 @@ import static org.springframework.security.config.Customizer.withDefaults;
|
||||
|
||||
|
||||
@SpringBootApplication(scanBasePackageClasses = MindmapController.class)
|
||||
@Import({ServletConfig.class, InterceptorsConfig.class})
|
||||
@Import({InterceptorsConfig.class})
|
||||
@EnableWebSecurity
|
||||
public class RestAppConfig {
|
||||
@Bean
|
||||
|
@ -12,7 +12,7 @@ spring.sql.init.mode=always
|
||||
spring.sql.init.platform=hsqldb
|
||||
|
||||
# LOG
|
||||
logging.level.root=TRACE
|
||||
logging.level.root=INFO
|
||||
logging.level.org.apache.tomcat=INFO
|
||||
|
||||
##################################################################################
|
||||
|
@ -38,7 +38,7 @@ import static com.wisemapping.test.rest.RestHelper.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
|
||||
@SpringBootTest(classes = {RestAppConfig.class, CommonConfig.class, MindmapController.class, AdminController.class, UserController.class}, webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
|
||||
@SpringBootTest(classes = {RestAppConfig.class, CommonConfig.class, MindmapController.class, AdminController.class, UserController.class}, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
public class RestAccountControllerTest {
|
||||
private static final String ADMIN_USER = "admin@wisemapping.org";
|
||||
private static final String ADMIN_PASSWORD = "test";
|
||||
|
@ -28,7 +28,7 @@ import static com.wisemapping.test.rest.RestHelper.createHeaders;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
|
||||
@SpringBootTest(classes = {RestAppConfig.class, CommonConfig.class, LabelController.class, AdminController.class, UserController.class}, webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
|
||||
@SpringBootTest(classes = {RestAppConfig.class, CommonConfig.class, LabelController.class, AdminController.class, UserController.class}, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
public class RestLabelControllerTest {
|
||||
private static final String COLOR = "#000000";
|
||||
|
||||
|
@ -30,7 +30,7 @@ import java.util.stream.Collectors;
|
||||
import static com.wisemapping.test.rest.RestHelper.createHeaders;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
@SpringBootTest(classes = {RestAppConfig.class, CommonConfig.class, MindmapController.class, AdminController.class, UserController.class}, webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
|
||||
@SpringBootTest(classes = {RestAppConfig.class, CommonConfig.class, MindmapController.class, AdminController.class, UserController.class}, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
public class RestMindmapControllerTest {
|
||||
|
||||
private RestUser user;
|
||||
@ -791,7 +791,7 @@ public class RestMindmapControllerTest {
|
||||
|
||||
private RestMindmap findMap(@NotNull HttpHeaders requestHeaders, @NotNull TestRestTemplate template, URI resourceUri) {
|
||||
final HttpEntity<RestMindmap> findMapEntity = new HttpEntity<>(requestHeaders);
|
||||
final ResponseEntity<RestMindmap> response = template.exchange("http://localhost:8081/" + resourceUri.toString(), HttpMethod.GET, findMapEntity, RestMindmap.class);
|
||||
final ResponseEntity<RestMindmap> response = template.exchange(resourceUri.toString(), HttpMethod.GET, findMapEntity, RestMindmap.class);
|
||||
|
||||
if (!response.getStatusCode().is2xxSuccessful()) {
|
||||
throw new IllegalArgumentException(response.toString());
|
||||
|
Loading…
Reference in New Issue
Block a user