X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=dmaap-mediator-producer%2Finternal%2Fserver%2Fserver_test.go;h=a4b19c43708bb686d1bb5843f76fc9cbb09c5eec;hb=47d0ee37691eddc290a1f9e34091dfd2020db07f;hp=444deba49ea5168654bee369fbccef1e304240b8;hpb=280385634f160bb78a8944998e9106a2f6549eb0;p=nonrtric.git diff --git a/dmaap-mediator-producer/internal/server/server_test.go b/dmaap-mediator-producer/internal/server/server_test.go index 444deba4..a4b19c43 100644 --- a/dmaap-mediator-producer/internal/server/server_test.go +++ b/dmaap-mediator-producer/internal/server/server_test.go @@ -51,7 +51,7 @@ func TestStatusHandler(t *testing.T) { name: "StatusHandler with correct path and method, should return OK", args: args{ responseRecorder: httptest.NewRecorder(), - r: newRequest("GET", "/", nil, t), + r: newRequest("GET", "/status", nil, t), }, wantedStatus: http.StatusOK, wantedBody: "All is well!", @@ -69,7 +69,7 @@ func TestStatusHandler(t *testing.T) { name: "StatusHandler with incorrect method, should return MethodNotAllowed", args: args{ responseRecorder: httptest.NewRecorder(), - r: newRequest("PUT", "/", nil, t), + r: newRequest("PUT", "/status", nil, t), }, wantedStatus: http.StatusMethodNotAllowed, wantedBody: "Method is not supported.\n", @@ -119,7 +119,7 @@ func TestCreateInfoJobHandler(t *testing.T) { name: "CreateInfoJobHandler with correct path and method, should return OK", args: args{ responseRecorder: httptest.NewRecorder(), - r: newRequest("POST", "/producer_simulator/info_job", &goodJobInfo, t), + r: newRequest("POST", "/jobs", &goodJobInfo, t), }, wantedStatus: http.StatusOK, wantedBody: "", @@ -128,7 +128,7 @@ func TestCreateInfoJobHandler(t *testing.T) { name: "CreateInfoJobHandler with incorrect job info, should return BadRequest", args: args{ responseRecorder: httptest.NewRecorder(), - r: newRequest("POST", "/producer_simulator/info_job", &badJobInfo, t), + r: newRequest("POST", "/jobs", &badJobInfo, t), }, wantedStatus: http.StatusBadRequest, wantedBody: "Invalid job info. Cause: error", @@ -146,7 +146,7 @@ func TestCreateInfoJobHandler(t *testing.T) { name: "CreateInfoJobHandler with incorrect method, should return MethodNotAllowed", args: args{ responseRecorder: httptest.NewRecorder(), - r: newRequest("PUT", "/producer_simulator/info_job", nil, t), + r: newRequest("PUT", "/jobs", nil, t), }, wantedStatus: http.StatusMethodNotAllowed, wantedBody: "Method is not supported.",