Update test to correct name of metric for request that returns a 401
The request is being made to '/' and, while the application does have a mapping for '/', that mapping is not looked for before Spring Security's filter rejects the request with a 401. This means that the request is considered to be unmapped and this is reflected in the metric's name. See #1331 and #1333
This commit is contained in:
@@ -79,7 +79,7 @@ public class UnsecureManagementSampleActuatorApplicationTests {
|
||||
assertEquals(HttpStatus.OK, entity.getStatusCode());
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> body = entity.getBody();
|
||||
assertTrue("Wrong body: " + body, body.containsKey("counter.status.401.root"));
|
||||
assertTrue("Wrong body: " + body, body.containsKey("counter.status.401.unmapped"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user