Merge "Change of ECS to ICS in test env"
[nonrtric.git] / dmaap-mediator-producer / stub / dmaap / mrstub.go
index 0ec38cc..451bc9a 100644 (file)
@@ -57,7 +57,7 @@ func main() {
        http.HandleFunc("/events/unauthenticated.SEC_FAULT_OUTPUT/dmaapmediatorproducer/STD_Fault_Messages", handleData)
 
        fmt.Print("Starting mr on port: ", *port)
-       http.ListenAndServeTLS(fmt.Sprintf(":%v", *port), "../../configs/producer.crt", "../../configs/producer.key", nil)
+       fmt.Println(http.ListenAndServeTLS(fmt.Sprintf(":%v", *port), "../../security/producer.crt", "../../security/producer.key", nil))
 
 }
 
@@ -71,12 +71,13 @@ func handleData(w http.ResponseWriter, req *http.Request) {
        var responseBody []byte
        if critical {
                responseBody = getFaultMessage("CRITICAL")
+               fmt.Println("Sending CRITICAL")
                critical = false
        } else {
                responseBody = getFaultMessage("NORMAL")
+               fmt.Println("Sending NORMAL")
                critical = true
        }
-       // w.Write(responseBody)
        fmt.Fprint(w, string(responseBody))
 }