From 5d8e00cb56f5568654627264b654ceb0e49fd198 Mon Sep 17 00:00:00 2001 From: Madhura Bhave Date: Tue, 6 Dec 2016 13:12:35 -0800 Subject: [PATCH] Fix HealthMvcEndpointTests See gh-7569 --- .../actuate/endpoint/mvc/HealthMvcEndpointTests.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HealthMvcEndpointTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HealthMvcEndpointTests.java index f6bd0c3d25..1a5595c42c 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HealthMvcEndpointTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HealthMvcEndpointTests.java @@ -64,8 +64,8 @@ public class HealthMvcEndpointTests { private UsernamePasswordAuthenticationToken user = createAuthenticationToken( "ROLE_USER"); - private UsernamePasswordAuthenticationToken admin = createAuthenticationToken( - "ROLE_ADMIN"); + private UsernamePasswordAuthenticationToken actuator = createAuthenticationToken( + "ROLE_ACTUATOR"); private UsernamePasswordAuthenticationToken hero = createAuthenticationToken( "ROLE_HERO"); @@ -137,7 +137,7 @@ public class HealthMvcEndpointTests { given(this.endpoint.invoke()) .willReturn(new Health.Builder().up().withDetail("foo", "bar").build()); given(this.endpoint.isSensitive()).willReturn(false); - Object result = this.mvc.invoke(this.admin); + Object result = this.mvc.invoke(this.actuator); assertThat(result instanceof Health).isTrue(); assertThat(((Health) result).getStatus() == Status.UP).isTrue(); assertThat(((Health) result).getDetails().get("foo")).isEqualTo("bar"); @@ -169,7 +169,7 @@ public class HealthMvcEndpointTests { this.environment.getPropertySources().addLast(SECURITY_ROLES); given(this.endpoint.invoke()) .willReturn(new Health.Builder().up().withDetail("foo", "bar").build()); - Object result = this.mvc.invoke(this.admin); + Object result = this.mvc.invoke(this.actuator); assertThat(result instanceof Health).isTrue(); assertThat(((Health) result).getStatus() == Status.UP).isTrue(); assertThat(((Health) result).getDetails().get("foo")).isNull(); @@ -181,7 +181,7 @@ public class HealthMvcEndpointTests { given(this.endpoint.isSensitive()).willReturn(true); given(this.endpoint.invoke()) .willReturn(new Health.Builder().up().withDetail("foo", "bar").build()); - Object result = this.mvc.invoke(this.admin); + Object result = this.mvc.invoke(this.actuator); assertThat(result instanceof Health).isTrue(); Health health = (Health) result; assertThat(health.getStatus() == Status.UP).isTrue();