From 5931ded3037fde7a49959626f006e95a1e40a947 Mon Sep 17 00:00:00 2001 From: KomachiSion Date: Tue, 15 Feb 2022 14:29:41 +0800 Subject: [PATCH] Remove unused mock in unit test. --- .../java/com/alibaba/nacos/auth/GrpcProtocolAuthServiceTest.java | 1 - .../java/com/alibaba/nacos/auth/HttpProtocolAuthServiceTest.java | 1 - 2 files changed, 2 deletions(-) diff --git a/auth/src/test/java/com/alibaba/nacos/auth/GrpcProtocolAuthServiceTest.java b/auth/src/test/java/com/alibaba/nacos/auth/GrpcProtocolAuthServiceTest.java index a3e4b84c3..db4814205 100644 --- a/auth/src/test/java/com/alibaba/nacos/auth/GrpcProtocolAuthServiceTest.java +++ b/auth/src/test/java/com/alibaba/nacos/auth/GrpcProtocolAuthServiceTest.java @@ -59,7 +59,6 @@ public class GrpcProtocolAuthServiceTest { protocolAuthService.initialize(); mockConfigRequest(); mockNamingRequest(); - Mockito.when(authConfigs.isAuthEnabled()).thenReturn(true); } private void mockConfigRequest() { diff --git a/auth/src/test/java/com/alibaba/nacos/auth/HttpProtocolAuthServiceTest.java b/auth/src/test/java/com/alibaba/nacos/auth/HttpProtocolAuthServiceTest.java index 0a7e6f8d4..27bbf6130 100644 --- a/auth/src/test/java/com/alibaba/nacos/auth/HttpProtocolAuthServiceTest.java +++ b/auth/src/test/java/com/alibaba/nacos/auth/HttpProtocolAuthServiceTest.java @@ -64,7 +64,6 @@ public class HttpProtocolAuthServiceTest { Mockito.when(request.getParameter(eq("tenant"))).thenReturn("testCNs"); Mockito.when(request.getParameter(eq(Constants.GROUP))).thenReturn("testCG"); Mockito.when(request.getParameter(eq(Constants.DATAID))).thenReturn("testD"); - Mockito.when(authConfigs.isAuthEnabled()).thenReturn(true); } @Test