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
6e22ddc1
Commit
6e22ddc1
authored
Nov 19, 2019
by
Madhura Bhave
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.1.x' into 2.2.x
parents
ff22bd48
849a76c6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
AutoConfiguredHealthEndpointGroupTests.java
...figure/health/AutoConfiguredHealthEndpointGroupTests.java
+6
-6
HealthWebEndpointResponseMapperTests.java
.../actuate/health/HealthWebEndpointResponseMapperTests.java
+1
-1
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/health/AutoConfiguredHealthEndpointGroupTests.java
View file @
6e22ddc1
...
@@ -161,21 +161,21 @@ class AutoConfiguredHealthEndpointGroupTests {
...
@@ -161,21 +161,21 @@ class AutoConfiguredHealthEndpointGroupTests {
}
}
@Test
@Test
void
showComponentsWhenShow
Detail
sIsNeverReturnsFalse
()
{
void
showComponentsWhenShow
Component
sIsNeverReturnsFalse
()
{
AutoConfiguredHealthEndpointGroup
group
=
new
AutoConfiguredHealthEndpointGroup
((
name
)
->
true
,
AutoConfiguredHealthEndpointGroup
group
=
new
AutoConfiguredHealthEndpointGroup
((
name
)
->
true
,
this
.
statusAggregator
,
this
.
httpCodeStatusMapper
,
Show
.
NEVER
,
Show
.
ALWAYS
,
Collections
.
emptySet
());
this
.
statusAggregator
,
this
.
httpCodeStatusMapper
,
Show
.
NEVER
,
Show
.
ALWAYS
,
Collections
.
emptySet
());
assertThat
(
group
.
showComponents
(
SecurityContext
.
NONE
)).
isFalse
();
assertThat
(
group
.
showComponents
(
SecurityContext
.
NONE
)).
isFalse
();
}
}
@Test
@Test
void
showComponentsWhenShow
Detail
sIsAlwaysReturnsTrue
()
{
void
showComponentsWhenShow
Component
sIsAlwaysReturnsTrue
()
{
AutoConfiguredHealthEndpointGroup
group
=
new
AutoConfiguredHealthEndpointGroup
((
name
)
->
true
,
AutoConfiguredHealthEndpointGroup
group
=
new
AutoConfiguredHealthEndpointGroup
((
name
)
->
true
,
this
.
statusAggregator
,
this
.
httpCodeStatusMapper
,
Show
.
ALWAYS
,
Show
.
NEVER
,
Collections
.
emptySet
());
this
.
statusAggregator
,
this
.
httpCodeStatusMapper
,
Show
.
ALWAYS
,
Show
.
NEVER
,
Collections
.
emptySet
());
assertThat
(
group
.
showComponents
(
SecurityContext
.
NONE
)).
isTrue
();
assertThat
(
group
.
showComponents
(
SecurityContext
.
NONE
)).
isTrue
();
}
}
@Test
@Test
void
showComponentsWhenShow
Detail
sIsWhenAuthorizedAndPrincipalIsNullReturnsFalse
()
{
void
showComponentsWhenShow
Component
sIsWhenAuthorizedAndPrincipalIsNullReturnsFalse
()
{
AutoConfiguredHealthEndpointGroup
group
=
new
AutoConfiguredHealthEndpointGroup
((
name
)
->
true
,
AutoConfiguredHealthEndpointGroup
group
=
new
AutoConfiguredHealthEndpointGroup
((
name
)
->
true
,
this
.
statusAggregator
,
this
.
httpCodeStatusMapper
,
Show
.
WHEN_AUTHORIZED
,
Show
.
NEVER
,
this
.
statusAggregator
,
this
.
httpCodeStatusMapper
,
Show
.
WHEN_AUTHORIZED
,
Show
.
NEVER
,
Collections
.
emptySet
());
Collections
.
emptySet
());
...
@@ -184,7 +184,7 @@ class AutoConfiguredHealthEndpointGroupTests {
...
@@ -184,7 +184,7 @@ class AutoConfiguredHealthEndpointGroupTests {
}
}
@Test
@Test
void
showComponentsWhenShow
Detail
sIsWhenAuthorizedAndRolesAreEmptyReturnsTrue
()
{
void
showComponentsWhenShow
Component
sIsWhenAuthorizedAndRolesAreEmptyReturnsTrue
()
{
AutoConfiguredHealthEndpointGroup
group
=
new
AutoConfiguredHealthEndpointGroup
((
name
)
->
true
,
AutoConfiguredHealthEndpointGroup
group
=
new
AutoConfiguredHealthEndpointGroup
((
name
)
->
true
,
this
.
statusAggregator
,
this
.
httpCodeStatusMapper
,
Show
.
WHEN_AUTHORIZED
,
Show
.
NEVER
,
this
.
statusAggregator
,
this
.
httpCodeStatusMapper
,
Show
.
WHEN_AUTHORIZED
,
Show
.
NEVER
,
Collections
.
emptySet
());
Collections
.
emptySet
());
...
@@ -193,7 +193,7 @@ class AutoConfiguredHealthEndpointGroupTests {
...
@@ -193,7 +193,7 @@ class AutoConfiguredHealthEndpointGroupTests {
}
}
@Test
@Test
void
showComponentsWhenShow
Detail
sIsWhenAuthorizedAndUseIsInRoleReturnsTrue
()
{
void
showComponentsWhenShow
Component
sIsWhenAuthorizedAndUseIsInRoleReturnsTrue
()
{
AutoConfiguredHealthEndpointGroup
group
=
new
AutoConfiguredHealthEndpointGroup
((
name
)
->
true
,
AutoConfiguredHealthEndpointGroup
group
=
new
AutoConfiguredHealthEndpointGroup
((
name
)
->
true
,
this
.
statusAggregator
,
this
.
httpCodeStatusMapper
,
Show
.
WHEN_AUTHORIZED
,
Show
.
NEVER
,
this
.
statusAggregator
,
this
.
httpCodeStatusMapper
,
Show
.
WHEN_AUTHORIZED
,
Show
.
NEVER
,
Arrays
.
asList
(
"admin"
,
"root"
,
"bossmode"
));
Arrays
.
asList
(
"admin"
,
"root"
,
"bossmode"
));
...
@@ -203,7 +203,7 @@ class AutoConfiguredHealthEndpointGroupTests {
...
@@ -203,7 +203,7 @@ class AutoConfiguredHealthEndpointGroupTests {
}
}
@Test
@Test
void
showComponentsWhenShow
Detail
sIsWhenAuthorizedAndUseIsNotInRoleReturnsFalse
()
{
void
showComponentsWhenShow
Component
sIsWhenAuthorizedAndUseIsNotInRoleReturnsFalse
()
{
AutoConfiguredHealthEndpointGroup
group
=
new
AutoConfiguredHealthEndpointGroup
((
name
)
->
true
,
AutoConfiguredHealthEndpointGroup
group
=
new
AutoConfiguredHealthEndpointGroup
((
name
)
->
true
,
this
.
statusAggregator
,
this
.
httpCodeStatusMapper
,
Show
.
WHEN_AUTHORIZED
,
Show
.
NEVER
,
this
.
statusAggregator
,
this
.
httpCodeStatusMapper
,
Show
.
WHEN_AUTHORIZED
,
Show
.
NEVER
,
Arrays
.
asList
(
"admin"
,
"rot"
,
"bossmode"
));
Arrays
.
asList
(
"admin"
,
"rot"
,
"bossmode"
));
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/HealthWebEndpointResponseMapperTests.java
View file @
6e22ddc1
...
@@ -75,7 +75,7 @@ class HealthWebEndpointResponseMapperTests {
...
@@ -75,7 +75,7 @@ class HealthWebEndpointResponseMapperTests {
}
}
@Test
@Test
void
mapDetailsWithAuthorizedUserInvokeSupplier
()
{
void
mapDetailsWithAuthorizedUserInvoke
s
Supplier
()
{
HealthWebEndpointResponseMapper
mapper
=
createMapper
(
ShowDetails
.
WHEN_AUTHORIZED
);
HealthWebEndpointResponseMapper
mapper
=
createMapper
(
ShowDetails
.
WHEN_AUTHORIZED
);
Supplier
<
Health
>
supplier
=
mockSupplier
();
Supplier
<
Health
>
supplier
=
mockSupplier
();
given
(
supplier
.
get
()).
willReturn
(
Health
.
down
().
build
());
given
(
supplier
.
get
()).
willReturn
(
Health
.
down
().
build
());
...
...
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