mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
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:
parent
1259057acb
commit
e185793396
@ -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"));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user