@ -26,7 +26,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import org.apache.dolphinscheduler.api.enums.Status ;
import org.apache.dolphinscheduler.api.enums.Status ;
import org.apache.dolphinscheduler.api.utils.Result ;
import org.apache.dolphinscheduler.api.utils.Result ;
import org.apache.dolphinscheduler.common.enums.AlertType ;
import org.apache.dolphinscheduler.common.utils.JSONUtils ;
import org.apache.dolphinscheduler.common.utils.JSONUtils ;
import org.apache.dolphinscheduler.dao.entity.AlertGroup ;
import org.apache.dolphinscheduler.dao.entity.AlertGroup ;
import org.apache.dolphinscheduler.dao.mapper.AlertGroupMapper ;
import org.apache.dolphinscheduler.dao.mapper.AlertGroupMapper ;
@ -75,7 +74,7 @@ public class AlertGroupControllerTest extends AbstractControllerTest {
public void test010CreateAlertGroup ( ) throws Exception {
public void test010CreateAlertGroup ( ) throws Exception {
MultiValueMap < String , String > paramsMap = new LinkedMultiValueMap < > ( ) ;
MultiValueMap < String , String > paramsMap = new LinkedMultiValueMap < > ( ) ;
paramsMap . add ( "groupName" , defaultTestAlertGroupName ) ;
paramsMap . add ( "groupName" , defaultTestAlertGroupName ) ;
paramsMap . add ( "groupType" , AlertType . EMAIL . toString ( ) ) ;
paramsMap . add ( "groupType" , "email" ) ;
paramsMap . add ( "description" , "cxc junit 测试告警描述" ) ;
paramsMap . add ( "description" , "cxc junit 测试告警描述" ) ;
paramsMap . add ( "alertInstanceIds" , "" ) ;
paramsMap . add ( "alertInstanceIds" , "" ) ;
MvcResult mvcResult = mockMvc . perform ( post ( "/alert-groups" )
MvcResult mvcResult = mockMvc . perform ( post ( "/alert-groups" )
@ -110,7 +109,7 @@ public class AlertGroupControllerTest extends AbstractControllerTest {
createEntity ( ) ;
createEntity ( ) ;
MultiValueMap < String , String > paramsMap = new LinkedMultiValueMap < > ( ) ;
MultiValueMap < String , String > paramsMap = new LinkedMultiValueMap < > ( ) ;
paramsMap . add ( "pageNo" , "1" ) ;
paramsMap . add ( "pageNo" , "1" ) ;
paramsMap . add ( "searchVal" , AlertType . EMAIL . toString ( ) ) ;
paramsMap . add ( "searchVal" , "email" ) ;
paramsMap . add ( "pageSize" , "1" ) ;
paramsMap . add ( "pageSize" , "1" ) ;
MvcResult mvcResult = mockMvc . perform ( get ( "/alert-groups" )
MvcResult mvcResult = mockMvc . perform ( get ( "/alert-groups" )
. header ( "sessionId" , sessionId )
. header ( "sessionId" , sessionId )
@ -144,7 +143,7 @@ public class AlertGroupControllerTest extends AbstractControllerTest {
int entityId = createEntity ( ) ;
int entityId = createEntity ( ) ;
MultiValueMap < String , String > paramsMap = new LinkedMultiValueMap < > ( ) ;
MultiValueMap < String , String > paramsMap = new LinkedMultiValueMap < > ( ) ;
paramsMap . add ( "groupName" , defaultTestAlertGroupName ) ;
paramsMap . add ( "groupName" , defaultTestAlertGroupName ) ;
paramsMap . add ( "groupType" , AlertType . EMAIL . toString ( ) ) ;
paramsMap . add ( "groupType" , "email" ) ;
paramsMap . add ( "description" , "update alter group" ) ;
paramsMap . add ( "description" , "update alter group" ) ;
paramsMap . add ( "alertInstanceIds" , "" ) ;
paramsMap . add ( "alertInstanceIds" , "" ) ;
MvcResult mvcResult = mockMvc . perform ( put ( "/alert-groups/" + entityId )
MvcResult mvcResult = mockMvc . perform ( put ( "/alert-groups/" + entityId )