From e185793396f2775c0d03fa45a41cac40ad9ec443 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 6 Aug 2014 13:38:42 +0100 Subject: [PATCH] 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 --- .../UnsecureManagementSampleActuatorApplicationTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/UnsecureManagementSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/UnsecureManagementSampleActuatorApplicationTests.java index 4890a39f2e6..8458764f4bb 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/UnsecureManagementSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/UnsecureManagementSampleActuatorApplicationTests.java @@ -79,7 +79,7 @@ public class UnsecureManagementSampleActuatorApplicationTests { assertEquals(HttpStatus.OK, entity.getStatusCode()); @SuppressWarnings("unchecked") Map body = entity.getBody(); - assertTrue("Wrong body: " + body, body.containsKey("counter.status.401.root")); + assertTrue("Wrong body: " + body, body.containsKey("counter.status.401.unmapped")); } }