Commit f5124e75 authored by Yann Garcia's avatar Yann Garcia
Browse files

Update test scripts for VIS

parent e2b65951
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -594,15 +594,13 @@ func updateStoreName(storeName string) {
		}
	}
}

func predictedQosPost(w http.ResponseWriter, r *http.Request) {
	log.Info(">>> predictedQosPost")
	w.Header().Set("Content-Type", "application/json; charset=UTF-8")

	// This hadr-coded response is just for testing purpose
	// This hard-coded response is just for testing purpose
	// VIS QoS logic shall be imlemented here
	// Initialize the data structure for the POST request
	// MEC-030 Clause 6.2.5
	// MEC-030 Clause 7.6.3.4
	expected_pointA := LocationInfoGeoArea{7.413917, 43.733505}
	expected_locationInfoA := LocationInfo{nil, &expected_pointA}
	expected_pointB := LocationInfoGeoArea{7.413916, 43.733515}
@@ -618,6 +616,7 @@ func predictedQosPost(w http.ResponseWriter, r *http.Request) {
	expected_routes[0] = expected_predictedQosRoutes
	response := PredictedQos{"100", expected_routes, nil}
	fmt.Println("response: ", response)
	// End of hard-coded response

	jsonResponse, err := json.Marshal(response)
	if err != nil {
@@ -626,5 +625,6 @@ func predictedQosPost(w http.ResponseWriter, r *http.Request) {
		return
	}
	w.WriteHeader(http.StatusOK)

	fmt.Fprintf(w, string(jsonResponse))
}