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
ba40f133
Commit
ba40f133
authored
Oct 28, 2014
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update expectation to match response from anonymous access to /health
parent
1c4650f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
7 deletions
+1
-7
SampleActuatorUiApplicationPortTests.java
...ple/actuator/ui/SampleActuatorUiApplicationPortTests.java
+1
-7
No files found.
spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationPortTests.java
View file @
ba40f133
...
@@ -20,9 +20,7 @@ import java.util.Map;
...
@@ -20,9 +20,7 @@ import java.util.Map;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.autoconfigure.security.SecurityProperties
;
import
org.springframework.boot.test.IntegrationTest
;
import
org.springframework.boot.test.IntegrationTest
;
import
org.springframework.boot.test.SpringApplicationConfiguration
;
import
org.springframework.boot.test.SpringApplicationConfiguration
;
import
org.springframework.boot.test.TestRestTemplate
;
import
org.springframework.boot.test.TestRestTemplate
;
...
@@ -46,9 +44,6 @@ import static org.junit.Assert.assertEquals;
...
@@ -46,9 +44,6 @@ import static org.junit.Assert.assertEquals;
@DirtiesContext
@DirtiesContext
public
class
SampleActuatorUiApplicationPortTests
{
public
class
SampleActuatorUiApplicationPortTests
{
@Autowired
private
SecurityProperties
security
;
@Value
(
"${local.server.port}"
)
@Value
(
"${local.server.port}"
)
private
int
port
=
9010
;
private
int
port
=
9010
;
...
@@ -75,8 +70,7 @@ public class SampleActuatorUiApplicationPortTests {
...
@@ -75,8 +70,7 @@ public class SampleActuatorUiApplicationPortTests {
ResponseEntity
<
String
>
entity
=
new
TestRestTemplate
().
getForEntity
(
ResponseEntity
<
String
>
entity
=
new
TestRestTemplate
().
getForEntity
(
"http://localhost:"
+
this
.
managementPort
+
"/health"
,
String
.
class
);
"http://localhost:"
+
this
.
managementPort
+
"/health"
,
String
.
class
);
assertEquals
(
HttpStatus
.
OK
,
entity
.
getStatusCode
());
assertEquals
(
HttpStatus
.
OK
,
entity
.
getStatusCode
());
assertEquals
(
"{\"status\":\"UP\",\"application\":{\"status\":\"UP\"}}"
,
assertEquals
(
"{\"status\":\"UP\"}"
,
entity
.
getBody
());
entity
.
getBody
());
}
}
}
}
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