TSK-1358: Fixed and adjusted arquillian tests

This commit is contained in:
Joerg Heffner 2020-08-31 12:59:13 +02:00 committed by BerndBreier
parent 08d1841f46
commit 34f32557e0
6 changed files with 20 additions and 15 deletions

View File

@ -83,6 +83,11 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>

View File

@ -28,7 +28,7 @@ import pro.taskana.workbasket.rest.models.WorkbasketSummaryRepresentationModel;
public class AbstractAccTest {
protected static final String DEPENDENCY_VERSION = "3.2.1-SNAPSHOT";
protected static final String DEPENDENCY_VERSION = "4.0.1-SNAPSHOT";
private static final String AUTHORIZATION_TEAMLEAD_1 = "Basic dGVhbWxlYWQtMTp0ZWFtbGVhZC0x";
/**

View File

@ -26,10 +26,10 @@ import org.slf4j.LoggerFactory;
* to change data source configuration at project-defaults.yml.
*/
@RunWith(Arquillian.class)
public class TaskanaWildflyWithHistoryLoggerEnabled extends AbstractAccTest {
public class TaskanaWildflyWithHistoryLoggerEnabledTest extends AbstractAccTest {
private static final Logger LOGGER =
LoggerFactory.getLogger(TaskanaWildflyWithHistoryLoggerEnabled.class);
LoggerFactory.getLogger(TaskanaWildflyWithHistoryLoggerEnabledTest.class);
@Deployment(testable = false)
public static Archive<?> createTestArchive() {
@ -45,7 +45,7 @@ public class TaskanaWildflyWithHistoryLoggerEnabled extends AbstractAccTest {
MavenCoordinate historyLoggerCoordinate =
MavenCoordinates.createCoordinate(
"pro.taskana.simplehistory",
"pro.taskana.history",
"taskana-loghistory-provider",
DEPENDENCY_VERSION,
PackagingType.JAR,

View File

@ -32,10 +32,10 @@ import pro.taskana.task.rest.models.TaskRepresentationModel;
* to change data source configuration at project-defaults.yml.
*/
@RunWith(Arquillian.class)
public class TaskanaWildflyWithSimpleHistoryAndHistoryLoggerEnabled extends AbstractAccTest {
public class TaskanaWildflyWithSimpleHistoryAndHistoryLoggerEnabledTest extends AbstractAccTest {
private static final Logger LOGGER =
LoggerFactory.getLogger(TaskanaWildflyWithSimpleHistoryAndHistoryLoggerEnabled.class);
LoggerFactory.getLogger(TaskanaWildflyWithSimpleHistoryAndHistoryLoggerEnabledTest.class);
@Deployment(testable = false)
public static Archive<?> createTestArchive() {
@ -51,7 +51,7 @@ public class TaskanaWildflyWithSimpleHistoryAndHistoryLoggerEnabled extends Abst
MavenCoordinate simpleHistoryCoordinate =
MavenCoordinates.createCoordinate(
"pro.taskana.simplehistory",
"pro.taskana.history",
"taskana-simplehistory-rest-spring",
DEPENDENCY_VERSION,
PackagingType.JAR,
@ -62,7 +62,7 @@ public class TaskanaWildflyWithSimpleHistoryAndHistoryLoggerEnabled extends Abst
MavenCoordinate historyLoggerCoordinate =
MavenCoordinates.createCoordinate(
"pro.taskana.simplehistory",
"pro.taskana.history",
"taskana-loghistory-provider",
DEPENDENCY_VERSION,
PackagingType.JAR,
@ -99,7 +99,7 @@ public class TaskanaWildflyWithSimpleHistoryAndHistoryLoggerEnabled extends Abst
performGetHistoryEventsRestCall();
assertThat(getHistoryEventsResponse.getBody()).isNotNull();
assertThat(getHistoryEventsResponse.getBody().getLink(IanaLinkRelations.SELF)).isNotNull();
assertThat(getHistoryEventsResponse.getBody().getContent()).isEmpty();
assertThat(getHistoryEventsResponse.getBody().getContent()).hasSize(45);
ResponseEntity<TaskRepresentationModel> responseCreateTask = performCreateTaskRestCall();
assertThat(responseCreateTask.getStatusCode()).isEqualTo(HttpStatus.CREATED);
@ -109,7 +109,7 @@ public class TaskanaWildflyWithSimpleHistoryAndHistoryLoggerEnabled extends Abst
assertThat(getHistoryEventsResponse.getBody()).isNotNull();
assertThat(getHistoryEventsResponse.getBody().getLink(IanaLinkRelations.SELF)).isNotNull();
assertThat(getHistoryEventsResponse.getBody().getContent()).hasSize(1);
assertThat(getHistoryEventsResponse.getBody().getContent()).hasSize(46);
String log = parseServerLog();

View File

@ -32,10 +32,10 @@ import pro.taskana.task.rest.models.TaskRepresentationModel;
* to change data source configuration at project-defaults.yml.
*/
@RunWith(Arquillian.class)
public class TaskanaWildflyWithSimpleHistoryEnabled extends AbstractAccTest {
public class TaskanaWildflyWithSimpleHistoryEnabledTest extends AbstractAccTest {
private static final Logger LOGGER =
LoggerFactory.getLogger(TaskanaWildflyWithSimpleHistoryEnabled.class);
LoggerFactory.getLogger(TaskanaWildflyWithSimpleHistoryEnabledTest.class);
@Deployment(testable = false)
public static Archive<?> createTestArchive() {
@ -51,7 +51,7 @@ public class TaskanaWildflyWithSimpleHistoryEnabled extends AbstractAccTest {
MavenCoordinate simpleHistoryCoordinate =
MavenCoordinates.createCoordinate(
"pro.taskana.simplehistory",
"pro.taskana.history",
"taskana-simplehistory-rest-spring",
DEPENDENCY_VERSION,
PackagingType.JAR,
@ -87,7 +87,7 @@ public class TaskanaWildflyWithSimpleHistoryEnabled extends AbstractAccTest {
performGetHistoryEventsRestCall();
assertThat(getHistoryEventsResponse.getBody()).isNotNull();
assertThat(getHistoryEventsResponse.getBody().getLink(IanaLinkRelations.SELF)).isNotNull();
assertThat(getHistoryEventsResponse.getBody().getContent()).isEmpty();
assertThat(getHistoryEventsResponse.getBody().getContent()).hasSize(45);
ResponseEntity<TaskRepresentationModel> responseCreateTask = performCreateTaskRestCall();
assertThat(responseCreateTask.getStatusCode()).isEqualTo(HttpStatus.CREATED);
@ -97,7 +97,7 @@ public class TaskanaWildflyWithSimpleHistoryEnabled extends AbstractAccTest {
assertThat(getHistoryEventsResponse.getBody()).isNotNull();
assertThat(getHistoryEventsResponse.getBody().getLink(IanaLinkRelations.SELF)).isNotNull();
assertThat(getHistoryEventsResponse.getBody().getContent()).hasSize(1);
assertThat(getHistoryEventsResponse.getBody().getContent()).hasSize(46);
}
}