File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
main/java/com/alibaba/nacos/config/server/model/form
test/java/com/alibaba/nacos/config/server/controller/v3 Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -40,13 +40,6 @@ public void setGroupName(String groupName) {
40
40
this .groupName = groupName ;
41
41
}
42
42
43
- @ Override
44
- public ConfigFormV3 clone () {
45
- ConfigFormV3 configFormV3 = (ConfigFormV3 ) super .clone ();
46
- configFormV3 .setGroupName (groupName );
47
- return configFormV3 ;
48
- }
49
-
50
43
@ Override
51
44
public void validate () throws NacosApiException {
52
45
if (StringUtils .isBlank (groupName )) {
Original file line number Diff line number Diff line change 26
26
import com .alibaba .nacos .core .remote .ConnectionManager ;
27
27
import com .alibaba .nacos .sys .env .EnvUtil ;
28
28
import jakarta .servlet .ServletContext ;
29
+ import org .junit .jupiter .api .AfterEach ;
29
30
import org .junit .jupiter .api .BeforeEach ;
30
31
import org .junit .jupiter .api .Test ;
31
32
import org .junit .jupiter .api .extension .ExtendWith ;
@@ -76,13 +77,19 @@ class MetricControllerV3Test {
76
77
77
78
@ BeforeEach
78
79
void setUp () {
80
+ System .setProperty ("nacos.core.auth.admin.enabled" , "false" );
79
81
EnvUtil .setEnvironment (new StandardEnvironment ());
80
82
when (servletContext .getContextPath ()).thenReturn ("/nacos" );
81
83
ReflectionTestUtils .setField (metricsControllerV3 , "serverMemberManager" , memberManager );
82
84
ReflectionTestUtils .setField (metricsControllerV3 , "connectionManager" , connectionManager );
83
85
mockMvc = MockMvcBuilders .standaloneSetup (metricsControllerV3 ).build ();
84
86
}
85
87
88
+ @ AfterEach
89
+ void tearDown () {
90
+ System .clearProperty ("nacos.core.auth.admin.enabled" );
91
+ }
92
+
86
93
@ Test
87
94
void testGetClusterMetric () throws Exception {
88
95
List <Member > members = new ArrayList <>();
You can’t perform that action at this time.
0 commit comments