-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #120 from hycomsa/118
- Loading branch information
Showing
9 changed files
with
93 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,14 +5,16 @@ | |
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; | ||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.security.test.context.support.WithMockUser; | ||
import org.springframework.test.annotation.DirtiesContext; | ||
import org.springframework.test.context.ActiveProfiles; | ||
import org.springframework.test.web.servlet.MockMvc; | ||
import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder; | ||
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; | ||
import pl.hycom.mokka.AbstractTest; | ||
import pl.hycom.mokka.Application; | ||
import pl.hycom.mokka.emulator.logs.model.Log; | ||
|
||
import java.sql.Timestamp; | ||
|
@@ -25,8 +27,11 @@ | |
* @author Kamil Adamiec ([email protected]) | ||
*/ | ||
@DirtiesContext | ||
@ActiveProfiles("test") | ||
@AutoConfigureMockMvc | ||
public class LogsControllerIntegrationTest extends AbstractTest { | ||
@AutoConfigureTestDatabase | ||
@SpringBootTest(classes = Application.class) | ||
public class LogsControllerIT { | ||
|
||
private static final String GET_LOGS_URI = "/logs"; | ||
|
||
|
@@ -91,3 +96,6 @@ private MockHttpServletRequestBuilder asyncRequest(MockHttpServletRequestBuilder | |
return builder.header("x-requested-with", "XMLHttpRequest"); | ||
} | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,11 @@ | |
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; | ||
import org.springframework.test.annotation.DirtiesContext; | ||
import pl.hycom.mokka.AbstractTest; | ||
import org.springframework.test.context.ActiveProfiles; | ||
|
||
import static io.restassured.RestAssured.expect; | ||
|
||
|
@@ -17,8 +18,10 @@ | |
* @author Mariusz Krysztofowicz ([email protected]) | ||
*/ | ||
@DirtiesContext | ||
@ActiveProfiles("test") | ||
@AutoConfigureTestDatabase | ||
@SpringBootTest(webEnvironment=WebEnvironment.RANDOM_PORT) | ||
public class FileControllerTest extends AbstractTest { | ||
public class FileControllerIT { | ||
@Value("${local.server.port}") | ||
protected int serverPort; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters