Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
b351288f
Commit
b351288f
authored
Dec 18, 2020
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix integration test app detection
See gh-18631
parent
a2a153ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
AbstractLaunchScriptIntegrationTests.java
...ot/launchscript/AbstractLaunchScriptIntegrationTests.java
+5
-6
LoaderIntegrationTests.java
...g/springframework/boot/loader/LoaderIntegrationTests.java
+6
-6
No files found.
spring-boot-tests/spring-boot-integration-tests/spring-boot-launch-script-tests/src/intTest/java/org/springframework/boot/launchscript/AbstractLaunchScriptIntegrationTests.java
View file @
b351288f
...
@@ -30,6 +30,7 @@ import org.testcontainers.images.builder.ImageFromDockerfile;
...
@@ -30,6 +30,7 @@ import org.testcontainers.images.builder.ImageFromDockerfile;
import
org.testcontainers.utility.MountableFile
;
import
org.testcontainers.utility.MountableFile
;
import
org.springframework.boot.ansi.AnsiColor
;
import
org.springframework.boot.ansi.AnsiColor
;
import
org.springframework.util.Assert
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
hamcrest
.
Matchers
.
containsString
;
import
static
org
.
hamcrest
.
Matchers
.
containsString
;
...
@@ -110,12 +111,10 @@ abstract class AbstractLaunchScriptIntegrationTests {
...
@@ -110,12 +111,10 @@ abstract class AbstractLaunchScriptIntegrationTests {
}
}
private
static
File
findApplication
()
{
private
static
File
findApplication
()
{
File
appJar
=
new
File
(
"build/app/build/libs/app.jar"
);
String
name
=
String
.
format
(
"build/%1$s/build/libs/%1$s.jar"
,
"spring-boot-launch-script-tests-app"
);
if
(
appJar
.
isFile
())
{
File
jar
=
new
File
(
name
);
return
appJar
;
Assert
.
state
(
jar
.
isFile
(),
()
->
"Could not find "
+
name
+
". Have you built it?"
);
}
return
jar
;
throw
new
IllegalStateException
(
"Could not find test application in build/app/build/libs directory. Have you built it?"
);
}
}
}
}
...
...
spring-boot-tests/spring-boot-integration-tests/spring-boot-loader-tests/src/intTest/java/org/springframework/boot/loader/LoaderIntegrationTests.java
View file @
b351288f
...
@@ -28,6 +28,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
...
@@ -28,6 +28,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
import
org.testcontainers.utility.DockerImageName
;
import
org.testcontainers.utility.DockerImageName
;
import
org.testcontainers.utility.MountableFile
;
import
org.testcontainers.utility.MountableFile
;
import
org.springframework.util.Assert
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
/**
/**
...
@@ -49,12 +51,10 @@ class LoaderIntegrationTests {
...
@@ -49,12 +51,10 @@ class LoaderIntegrationTests {
.
withCommand
(
"java"
,
"-jar"
,
"app.jar"
);
.
withCommand
(
"java"
,
"-jar"
,
"app.jar"
);
private
static
File
findApplication
()
{
private
static
File
findApplication
()
{
File
appJar
=
new
File
(
"build/app/build/libs/app.jar"
);
String
name
=
String
.
format
(
"build/%1$s/build/libs/%1$s.jar"
,
"spring-boot-loader-tests-app"
);
if
(
appJar
.
isFile
())
{
File
jar
=
new
File
(
name
);
return
appJar
;
Assert
.
state
(
jar
.
isFile
(),
()
->
"Could not find "
+
name
+
". Have you built it?"
);
}
return
jar
;
throw
new
IllegalStateException
(
"Could not find test application in build/app/build/libs directory. Have you built it?"
);
}
}
@Test
@Test
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment