Issue-ID: NONRTRIC-944
Change-Id: I811e9333dd693e24acd71d82c34ef5cfc5f38100
Signed-off-by: ambrishest <ambrish.singh@est.tech>
sleep 10
echo "Make an HTTP request to the Hello World endpoint and display the response"
sleep 10
echo "Make an HTTP request to the Hello World endpoint and display the response"
-response=$(curl -s http://localhost:8080/helloworld/sme)
+response=$(curl -s http://localhost:8080/v1/helloworld/sme)
-echo "Response from the /helloworld/sme endpoint: "
+echo "Response from the /v1/helloworld/sme endpoint: "
-response2=$(curl -s http://localhost:8080/helloworld)
-echo "Response from the /helloworld endpoint: "
+response2=$(curl -s http://localhost:8080/v1/helloworld)
+echo "Response from the /v1/helloworld endpoint: "
import org.springframework.web.bind.annotation.RestController;\r
\r
@RestController\r
import org.springframework.web.bind.annotation.RestController;\r
\r
@RestController\r
-@RequestMapping("/helloworld")\r
+@RequestMapping("/v1/helloworld")\r
public class HelloWorldController {\r
\r
@RequestMapping("")\r
public class HelloWorldController {\r
\r
@RequestMapping("")\r
public void testHelloWorldEndpoint() throws Exception {\r
when(helloWorldController.helloWorld()).thenReturn("Hello World from service stub\n");\r
\r
public void testHelloWorldEndpoint() throws Exception {\r
when(helloWorldController.helloWorld()).thenReturn("Hello World from service stub\n");\r
\r
- mockMvc.perform(get("/helloworld"))\r
+ mockMvc.perform(get("/v1/helloworld"))\r
.andExpect(status().isOk())\r
.andExpect(content().string("Hello World from service stub\n"));\r
}\r
.andExpect(status().isOk())\r
.andExpect(content().string("Hello World from service stub\n"));\r
}\r
public void testHelloWorldSmeEndpoint() throws Exception {\r
when(helloWorldController.helloWorldSme()).thenReturn("Hello World from SME\n");\r
\r
public void testHelloWorldSmeEndpoint() throws Exception {\r
when(helloWorldController.helloWorldSme()).thenReturn("Hello World from SME\n");\r
\r
- mockMvc.perform(get("/helloworld/sme"))\r
+ mockMvc.perform(get("/v1/helloworld/sme"))\r
.andExpect(status().isOk())\r
.andExpect(content().string("Hello World from SME\n"));\r
}\r
.andExpect(status().isOk())\r
.andExpect(content().string("Hello World from SME\n"));\r
}\r