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
f94ce495
Commit
f94ce495
authored
Jul 07, 2018
by
Johnny Lim
Committed by
Madhura Bhave
Jul 10, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix parameter order for RequestMatcherAssert.doesNotMatch()
Closes gh-13707
parent
177c54d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
EndpointRequestTests.java
.../autoconfigure/security/servlet/EndpointRequestTests.java
+11
-10
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/servlet/EndpointRequestTests.java
View file @
f94ce495
...
@@ -78,14 +78,15 @@ public class EndpointRequestTests {
...
@@ -78,14 +78,15 @@ public class EndpointRequestTests {
@Test
@Test
public
void
toAnyEndpointWhenServletPathNotEmptyShouldMatch
()
{
public
void
toAnyEndpointWhenServletPathNotEmptyShouldMatch
()
{
RequestMatcher
matcher
=
EndpointRequest
.
toAnyEndpoint
();
RequestMatcher
matcher
=
EndpointRequest
.
toAnyEndpoint
();
assertMatcher
(
matcher
,
"/actuator"
,
"/spring"
,
"/admin"
).
matches
(
"/actuator/foo"
,
assertMatcher
(
matcher
,
"/actuator"
,
"/spring"
,
"/admin"
)
"/spring"
,
"/admin"
);
.
matches
(
Arrays
.
asList
(
"/spring"
,
"/admin"
),
"/actuator/foo"
);
assertMatcher
(
matcher
,
"/actuator"
,
"/spring"
,
"/admin"
).
matches
(
"/actuator/bar"
,
assertMatcher
(
matcher
,
"/actuator"
,
"/spring"
,
"/admin"
)
"/spring"
,
"/admin"
);
.
matches
(
Arrays
.
asList
(
"/spring"
,
"/admin"
),
"/actuator/bar"
);
assertMatcher
(
matcher
,
"/actuator"
,
"/spring"
).
matches
(
"/actuator"
,
"/spring"
);
assertMatcher
(
matcher
,
"/actuator"
,
"/spring"
).
matches
(
Arrays
.
asList
(
"/spring"
),
assertMatcher
(
matcher
,
"/actuator"
,
"/spring"
).
doesNotMatch
(
"/actuator/baz"
,
"/actuator"
);
"/spring"
);
assertMatcher
(
matcher
,
"/actuator"
,
"/spring"
).
doesNotMatch
(
"/spring"
,
assertMatcher
(
matcher
,
"/actuator"
,
"/spring"
).
doesNotMatch
(
"/actuator/foo"
,
""
);
"/actuator/baz"
);
assertMatcher
(
matcher
,
"/actuator"
,
"/spring"
).
doesNotMatch
(
""
,
"/actuator/foo"
);
}
}
@Test
@Test
...
@@ -279,8 +280,8 @@ public class EndpointRequestTests {
...
@@ -279,8 +280,8 @@ public class EndpointRequestTests {
matches
(
mockRequest
(
servletPath
));
matches
(
mockRequest
(
servletPath
));
}
}
public
void
matches
(
String
pathInfo
,
String
...
servletPaths
)
{
public
void
matches
(
List
<
String
>
servletPaths
,
String
pathInfo
)
{
Arrays
.
stream
(
servletPaths
)
.
forEach
((
p
)
->
matches
(
mockRequest
(
p
,
pathInfo
)));
servletPaths
.
forEach
((
p
)
->
matches
(
mockRequest
(
p
,
pathInfo
)));
}
}
private
void
matches
(
HttpServletRequest
request
)
{
private
void
matches
(
HttpServletRequest
request
)
{
...
...
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