@ -19,6 +19,7 @@ package org.apache.dolphinscheduler.api.controller;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get ;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get ;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post ;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post ;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put ;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content ;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content ;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status ;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status ;
@ -152,7 +153,7 @@ public class ResourcesControllerTest extends AbstractControllerTest {
paramsMap . add ( "id" , "1" ) ;
paramsMap . add ( "id" , "1" ) ;
paramsMap . add ( "content" , "echo test_1111" ) ;
paramsMap . add ( "content" , "echo test_1111" ) ;
MvcResult mvcResult = mockMvc . perform ( pos t ( "/resources/update-content" )
MvcResult mvcResult = mockMvc . perform ( pu t ( "/resources/1 /update-content" )
. header ( SESSION_ID , sessionId )
. header ( SESSION_ID , sessionId )
. params ( paramsMap ) )
. params ( paramsMap ) )
. andExpect ( status ( ) . isOk ( ) )
. andExpect ( status ( ) . isOk ( ) )
@ -171,7 +172,7 @@ public class ResourcesControllerTest extends AbstractControllerTest {
MultiValueMap < String , String > paramsMap = new LinkedMultiValueMap < > ( ) ;
MultiValueMap < String , String > paramsMap = new LinkedMultiValueMap < > ( ) ;
paramsMap . add ( "id" , "5" ) ;
paramsMap . add ( "id" , "5" ) ;
MvcResult mvcResult = mockMvc . perform ( get ( "/resources/download" )
MvcResult mvcResult = mockMvc . perform ( get ( "/resources/{id}/ download" , 5 )
. header ( SESSION_ID , sessionId )
. header ( SESSION_ID , sessionId )
. params ( paramsMap ) )
. params ( paramsMap ) )
. andExpect ( status ( ) . isOk ( ) )
. andExpect ( status ( ) . isOk ( ) )