Fix debug output for startup and test
This commit is contained in:
parent
8483fe7db9
commit
2b06c37be8
@ -148,7 +148,7 @@ func (ws *WebService) StartWebServer() {
|
|||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
listen := fmt.Sprintf(":%d", ws.Config.Config.Port)
|
listen := fmt.Sprintf(":%d", ws.Config.Config.Port)
|
||||||
log.Print("Starting web server on http://localhost%s", listen)
|
log.Printf("Starting web server on http://localhost%s", listen)
|
||||||
err := http.ListenAndServe(listen, nil) // set listen port
|
err := http.ListenAndServe(listen, nil) // set listen port
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("ListenAndServe: ", err)
|
log.Fatal("ListenAndServe: ", err)
|
||||||
|
@ -78,7 +78,7 @@ func TestGetConfig(t *testing.T) {
|
|||||||
t.Errorf("expected error to be nil got %v", err)
|
t.Errorf("expected error to be nil got %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if string(b) != `{"WatchInterval":10,"Version":2,"Watchers":[{"WebHookURL":"abcedf","Path":"/Users/justin/tmp","Username":"","NoWatermark":false,"Exclude":[]}]}` {
|
if string(b) != `{"WatchInterval":10,"Version":2,"Port":9090,"Watchers":[{"WebHookURL":"abcedf","Path":"/Users/justin/tmp","Username":"","NoWatermark":false,"Exclude":[]}]}` {
|
||||||
t.Errorf("Got unexpected response %v", string(b))
|
t.Errorf("Got unexpected response %v", string(b))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user