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
994f08d2
Commit
994f08d2
authored
Aug 08, 2019
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish "Fix annotation lookup on proxied EndpointExtension"
See gh-17807
parent
9083da28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
EndpointDiscovererTests.java
.../actuate/endpoint/annotation/EndpointDiscovererTests.java
+14
-14
No files found.
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/annotation/EndpointDiscovererTests.java
View file @
994f08d2
...
...
@@ -114,15 +114,6 @@ public class EndpointDiscovererTests {
load
(
TestEndpointConfiguration
.
class
,
this
::
hasTestEndpoint
);
}
@Test
public
void
getEndpointsWhenHasProxiedEndpointShouldReturnEndpoint
()
{
load
(
ProxiedSpecializedEndpointsConfiguration
.
class
,
(
context
)
->
{
SpecializedEndpointDiscoverer
discoverer
=
new
SpecializedEndpointDiscoverer
(
context
);
Map
<
EndpointId
,
SpecializedExposableEndpoint
>
endpoints
=
mapEndpoints
(
discoverer
.
getEndpoints
());
assertThat
(
endpoints
).
containsOnlyKeys
(
EndpointId
.
of
(
"test"
),
EndpointId
.
of
(
"specialized"
));
});
}
@Test
public
void
getEndpointsWhenHasEndpointInParentContextShouldReturnEndpoint
()
{
AnnotationConfigApplicationContext
parent
=
new
AnnotationConfigApplicationContext
(
...
...
@@ -247,6 +238,15 @@ public class EndpointDiscovererTests {
});
}
@Test
public
void
getEndpointsWhenHasProxiedEndpointShouldReturnEndpoint
()
{
load
(
ProxiedSpecializedEndpointsConfiguration
.
class
,
(
context
)
->
{
SpecializedEndpointDiscoverer
discoverer
=
new
SpecializedEndpointDiscoverer
(
context
);
Map
<
EndpointId
,
SpecializedExposableEndpoint
>
endpoints
=
mapEndpoints
(
discoverer
.
getEndpoints
());
assertThat
(
endpoints
).
containsOnlyKeys
(
EndpointId
.
of
(
"test"
),
EndpointId
.
of
(
"specialized"
));
});
}
@Test
public
void
getEndpointsShouldApplyFilters
()
{
load
(
SpecializedEndpointsConfiguration
.
class
,
(
context
)
->
{
...
...
@@ -401,11 +401,6 @@ public class EndpointDiscovererTests {
}
@Import
({
TestEndpoint
.
class
,
ProxiedSpecializedTestEndpointConfiguration
.
class
,
SpecializedTestEndpoint
.
class
})
static
class
ProxiedSpecializedEndpointsConfiguration
{
}
@Import
({
TestEndpoint
.
class
,
SpecializedTestEndpoint
.
class
,
SpecializedExtension
.
class
})
static
class
SpecializedEndpointsConfiguration
{
...
...
@@ -416,6 +411,11 @@ public class EndpointDiscovererTests {
}
@Import
({
TestEndpoint
.
class
,
SpecializedTestEndpoint
.
class
,
ProxiedSpecializedTestEndpointConfiguration
.
class
})
static
class
ProxiedSpecializedEndpointsConfiguration
{
}
@Endpoint
(
id
=
"test"
)
static
class
TestEndpoint
{
...
...
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