Skip to content

Commit 32bb6f6

Browse files
Move deployment tests to system tests pipeline
Closes spring-projectsgh-27499
1 parent 1c6bc99 commit 32bb6f6

File tree

13 files changed

+68
-60
lines changed

13 files changed

+68
-60
lines changed

settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ include "spring-boot-project:spring-boot-docs"
7171
include "spring-boot-project:spring-boot-properties-migrator"
7272
include "spring-boot-project:spring-boot-test"
7373
include "spring-boot-project:spring-boot-test-autoconfigure"
74-
include "spring-boot-tests:spring-boot-deployment-tests"
7574
include "spring-boot-tests:spring-boot-integration-tests:spring-boot-configuration-processor-tests"
7675
include "spring-boot-tests:spring-boot-integration-tests:spring-boot-launch-script-tests"
7776
include "spring-boot-tests:spring-boot-integration-tests:spring-boot-loader-tests"
7877
include "spring-boot-tests:spring-boot-integration-tests:spring-boot-server-tests"
78+
include "spring-boot-system-tests:spring-boot-deployment-tests"
7979
include "spring-boot-system-tests:spring-boot-image-tests"
8080

8181
file("${rootDir}/spring-boot-project/spring-boot-starters").eachDirMatch(~/spring-boot-starter.*/) {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
plugins {
2+
id "war"
3+
id "org.springframework.boot.conventions"
4+
id "org.springframework.boot.system-test"
5+
}
6+
7+
description = "Spring Boot Deployment Tests"
8+
9+
configurations {
10+
providedRuntime {
11+
extendsFrom dependencyManagement
12+
}
13+
}
14+
15+
configurations.all {
16+
exclude module: "spring-boot-starter-logging"
17+
}
18+
19+
dependencies {
20+
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web")) {
21+
exclude group: "org.hibernate.validator"
22+
}
23+
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-actuator"))
24+
25+
systemTestImplementation(enforcedPlatform(project(path: ":spring-boot-project:spring-boot-parent")))
26+
systemTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
27+
systemTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
28+
systemTestImplementation("org.apache.httpcomponents:httpasyncclient")
29+
systemTestImplementation("org.awaitility:awaitility")
30+
systemTestImplementation("org.testcontainers:junit-jupiter")
31+
systemTestImplementation("org.testcontainers:testcontainers")
32+
systemTestImplementation("org.springframework:spring-web")
33+
34+
providedRuntime(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-tomcat"))
35+
}
36+
37+
systemTest {
38+
inputs.files(war).withNormalizer(ClasspathNormalizer)
39+
}
40+
41+
war {
42+
archiveVersion = ''
43+
}

spring-boot-tests/spring-boot-deployment-tests/src/intTest/java/sample/AbstractDeploymentIntegrationTests.java spring-boot-system-tests/spring-boot-deployment-tests/src/systemTest/java/org/springframework/boot/deployment/AbstractDeploymentTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package sample;
17+
package org.springframework.boot.deployment;
1818

1919
import java.io.File;
2020
import java.time.Duration;
@@ -37,9 +37,9 @@
3737
import static org.assertj.core.api.Assertions.assertThat;
3838

3939
/**
40-
* Abstract class for deployment integration tests.
40+
* Abstract class for deployment tests.
4141
*/
42-
abstract class AbstractDeploymentIntegrationTests {
42+
abstract class AbstractDeploymentTests {
4343

4444
protected static final int DEFAULT_PORT = 8080;
4545

spring-boot-tests/spring-boot-deployment-tests/src/intTest/java/sample/OpenLibertyDeploymentIntegrationTests.java spring-boot-system-tests/spring-boot-deployment-tests/src/systemTest/java/org/springframework/boot/deployment/OpenLibertyDeploymentIntegrationTests.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,25 @@
1414
* limitations under the License.
1515
*/
1616

17-
package sample;
17+
package org.springframework.boot.deployment;
1818

1919
import org.testcontainers.junit.jupiter.Container;
2020
import org.testcontainers.junit.jupiter.Testcontainers;
2121

2222
/**
23-
* Deployment integration tests for Open Liberty.
23+
* Deployment tests for Open Liberty.
2424
*
2525
* @author Christoph Dreis
26+
* @author Scott Frederick
2627
*/
2728
@Testcontainers(disabledWithoutDocker = true)
28-
class OpenLibertyDeploymentIntegrationTests extends AbstractDeploymentIntegrationTests {
29+
class OpenLibertyDeploymentTests extends AbstractDeploymentTests {
2930

3031
private static final int PORT = 9080;
3132

3233
@Container
3334
static WarDeploymentContainer container = new WarDeploymentContainer(
34-
"openliberty/open-liberty:20.0.0.9-kernel-java8-openj9-ubi", "/config/dropins", PORT);
35+
"openliberty/open-liberty:full-java8-openj9-ubi", "/config/dropins", PORT);
3536

3637
@Override
3738
WarDeploymentContainer getContainer() {

spring-boot-tests/spring-boot-deployment-tests/src/intTest/java/sample/TomEEDeploymentIntegrationTests.java spring-boot-system-tests/spring-boot-deployment-tests/src/systemTest/java/org/springframework/boot/deployment/TomEEDeploymentIntegrationTests.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,23 @@
1414
* limitations under the License.
1515
*/
1616

17-
package sample;
17+
package org.springframework.boot.deployment;
1818

1919
import org.testcontainers.junit.jupiter.Container;
2020
import org.testcontainers.junit.jupiter.Testcontainers;
2121

2222
/**
23-
* Deployment integration tests for TomEE.
23+
* Deployment tests for TomEE.
2424
*
2525
* @author Christoph Dreis
26+
* @author Scott Frederick
2627
*/
2728
@Testcontainers(disabledWithoutDocker = true)
28-
class TomEEDeploymentIntegrationTests extends AbstractDeploymentIntegrationTests {
29+
class TomEEDeploymentTests extends AbstractDeploymentTests {
2930

3031
@Container
31-
static WarDeploymentContainer container = new WarDeploymentContainer("tomee:8-jre-8.0.2-webprofile",
32-
"/usr/local/tomee/webapps", DEFAULT_PORT);
32+
static WarDeploymentContainer container = new WarDeploymentContainer("tomee:8", "/usr/local/tomee/webapps",
33+
DEFAULT_PORT);
3334

3435
@Override
3536
WarDeploymentContainer getContainer() {

spring-boot-tests/spring-boot-deployment-tests/src/intTest/java/sample/TomcatDeploymentIntegrationTests.java spring-boot-system-tests/spring-boot-deployment-tests/src/systemTest/java/org/springframework/boot/deployment/TomcatDeploymentIntegrationTests.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,22 @@
1414
* limitations under the License.
1515
*/
1616

17-
package sample;
17+
package org.springframework.boot.deployment;
1818

1919
import org.testcontainers.junit.jupiter.Container;
2020
import org.testcontainers.junit.jupiter.Testcontainers;
2121

2222
/**
23-
* Deployment integration tests for Tomcat.
23+
* Deployment tests for Tomcat.
2424
*
2525
* @author Christoph Dreis
26+
* @author Scott Frederick
2627
*/
2728
@Testcontainers(disabledWithoutDocker = true)
28-
class TomcatDeploymentIntegrationTests extends AbstractDeploymentIntegrationTests {
29+
class TomcatDeploymentTests extends AbstractDeploymentTests {
2930

3031
@Container
31-
static WarDeploymentContainer container = new WarDeploymentContainer("tomcat:9.0.37-jdk8-openjdk",
32+
static WarDeploymentContainer container = new WarDeploymentContainer("tomcat:9-jdk8-openjdk",
3233
"/usr/local/tomcat/webapps", DEFAULT_PORT);
3334

3435
@Override

spring-boot-tests/spring-boot-deployment-tests/src/intTest/java/sample/WildflyDeploymentIntegrationTests.java spring-boot-system-tests/spring-boot-deployment-tests/src/systemTest/java/org/springframework/boot/deployment/WildflyDeploymentIntegrationTests.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,22 @@
1414
* limitations under the License.
1515
*/
1616

17-
package sample;
17+
package org.springframework.boot.deployment;
1818

1919
import org.testcontainers.junit.jupiter.Container;
2020
import org.testcontainers.junit.jupiter.Testcontainers;
2121

2222
/**
23-
* Deployment integration tests for Wildfly.
23+
* Deployment tests for Wildfly.
2424
*
2525
* @author Christoph Dreis
26+
* @author Scott Frederick
2627
*/
2728
@Testcontainers(disabledWithoutDocker = true)
28-
class WildflyDeploymentIntegrationTests extends AbstractDeploymentIntegrationTests {
29+
class WildflyDeploymentTests extends AbstractDeploymentTests {
2930

3031
@Container
31-
static WarDeploymentContainer container = new WarDeploymentContainer("jboss/wildfly:20.0.1.Final",
32+
static WarDeploymentContainer container = new WarDeploymentContainer("jboss/wildfly:latest",
3233
"/opt/jboss/wildfly/standalone/deployments", DEFAULT_PORT);
3334

3435
@Override

spring-boot-tests/spring-boot-deployment-tests/build.gradle

-39
This file was deleted.

0 commit comments

Comments
 (0)