Commit e1857933 authored by Andy Wilkinson's avatar Andy Wilkinson

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
parent 1259057a
...@@ -79,7 +79,7 @@ public class UnsecureManagementSampleActuatorApplicationTests { ...@@ -79,7 +79,7 @@ public class UnsecureManagementSampleActuatorApplicationTests {
assertEquals(HttpStatus.OK, entity.getStatusCode()); assertEquals(HttpStatus.OK, entity.getStatusCode());
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
Map<String, Object> body = entity.getBody(); 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"));
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment