Commit 2384acd7 authored by Ikram Haq's avatar Ikram Haq
Browse files

implement unit test cases for mec011 capif endpoints

parent fb58c301
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1107,6 +1107,8 @@ func applicationsSubscriptionsPUT(w http.ResponseWriter, r *http.Request) {
	fmt.Fprint(w, jsonSub)
}

var HrefUrl string 

func applicationsSubscriptionsPOST(w http.ResponseWriter, r *http.Request) {
	log.Info("applicationsSubscriptionsPOST")

@@ -1192,9 +1194,9 @@ func applicationsSubscriptionsPOST(w http.ResponseWriter, r *http.Request) {
		errHandlerProblemDetails(w, "Failed to create subscription", http.StatusInternalServerError)
		return
	}
	hrefUrl := hostUrl.String() + basePath + "applications/" + appId + "/subscriptions/" + subId
	HrefUrl = hostUrl.String() + basePath + "applications/" + appId + "/subscriptions/" + subId
	// Send response
	w.Header().Set("Location", hrefUrl)
	w.Header().Set("Location", HrefUrl)
	w.WriteHeader(http.StatusCreated)
	fmt.Fprint(w, jsonSub)
}
+621 −4

File changed.

Preview size limit exceeded, changes collapsed.