Commit 1860b0a9 authored by Simon Pastor's avatar Simon Pastor
Browse files

ut

parent eacab7d6
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -901,9 +901,12 @@ func testServicesPost(t *testing.T) string {
	 * request execution section
	 ******************************/

	//creating the appInfoMap so that the POST returns a valid response
	var appInfo scc.ApplicationInfo
	appInfoMap["myapp"] = &appInfo

	rr, err := sendRequest(http.MethodPost, "/services", bytes.NewBuffer(body), nil, nil, http.StatusCreated, AppMobilityServicePOST)
	if err != nil {
	
		t.Fatalf("Failed to get expected response")
	}

@@ -962,6 +965,10 @@ func testServicesPut(t *testing.T, serviceId string, expectSuccess bool) string
	 ******************************/

	if expectSuccess {
		//creating the appInfoMap so that the POST returns a valid response
		var appInfo scc.ApplicationInfo
		appInfoMap["myapp"] = &appInfo

		rr, err := sendRequest(http.MethodPost, "/services", bytes.NewBuffer(body), vars, nil, http.StatusOK, AppMobilityServiceByIdPUT)
		if err != nil {
			t.Fatalf("Failed to get expected response")
@@ -1847,8 +1854,6 @@ func initializeVars() {
	redisAddr = redisTestAddr
	influxAddr = influxTestAddr
	sandboxName = testScenarioName
	var appInfo scc.ApplicationInfo
	appInfoMap["myapp"] = &appInfo
}

func initialiseScenario(testScenario string) {