99import static org .junit .jupiter .api .Assertions .assertEquals ;
1010
1111public class HTTPPathMetricFilterTest {
12- final Set <String > pathSet = Set .of ("/v1/identity/map" , "/token/refresh" );
12+ final Set <String > pathSet = Set .of ("/v1/identity/map" , "/token/refresh" , "/list" , "/list/:siteId/:keyId" );
1313
1414 @ ParameterizedTest
1515 @ ValueSource (strings = {
@@ -18,6 +18,7 @@ public class HTTPPathMetricFilterTest {
1818 "/unknown-path" ,
1919 "../" ,
2020 "/v1/identity/map%55" ,
21+ "/list/123" ,
2122 })
2223 void testPathFiltering_InvalidPaths_Unknown (String actualPath ) {
2324 String filteredPath = HTTPPathMetricFilter .filterPath (actualPath , pathSet );
@@ -28,6 +29,7 @@ void testPathFiltering_InvalidPaths_Unknown(String actualPath) {
2829 @ ValueSource (strings = {
2930 "v1/identity/map?id=bad-escape-code%2" ,
3031 "token/refresh?refresh_token=SOME_TOKEN<%=7485*4353%>" ,
32+ "list/12%4/5435"
3133 })
3234 void testPathFiltering_InvalidPaths_ParsingError (String actualPath ) {
3335 String filteredPath = HTTPPathMetricFilter .filterPath (actualPath , pathSet );
@@ -44,6 +46,8 @@ void testPathFiltering_InvalidPaths_ParsingError(String actualPath) {
4446 "/v1/identity/new/path/../../map, /v1/identity/map" ,
4547 "token/refresh?refresh_token=123%20%23, /token/refresh" ,
4648 "v1/identity/map?identity/../map/, /v1/identity/map" ,
49+ "/list, /list" ,
50+ "/list/123/key123, /list/:siteId/:keyId"
4751
4852 })
4953 void testPathFiltering_ValidPaths_KnownEndpoints (String actualPath , String expectedFilteredPath ) {
0 commit comments