diff --git a/server/database/remote_test.go b/server/database/remote_test.go index 0ef7a824..b5ad77ce 100644 --- a/server/database/remote_test.go +++ b/server/database/remote_test.go @@ -55,7 +55,7 @@ func TestRemoteInsert(t *testing.T) { setup() defer teardown() - remote := &model.Remote{0, "bitbucket.org", "bitbucket.org", "https://bitbucket.org", "https://bitbucket.org", "abc", "123", false} + remote := &model.Remote{ID: 0, Type: "bitbucket.org", Host: "bitbucket.org", URL: "https://bitbucket.org", API: "https://bitbucket.org", Client: "abc", Secret: "123", Open: false} remotes := NewRemoteManager(db) if err := remotes.Insert(remote); err != nil { t.Errorf("Want Remote created, got %s", err) diff --git a/server/handler/ws.go b/server/handler/ws.go index ff69da07..f6c7e368 100644 --- a/server/handler/ws.go +++ b/server/handler/ws.go @@ -158,19 +158,19 @@ func (h *WsHandler) WsConsole(w http.ResponseWriter, r *http.Request) error { ws.SetWriteDeadline(time.Now().Add(writeWait)) err := ws.WriteMessage(websocket.TextMessage, data) if err != nil { - log.Println("websocket for commit %d closed. Err: %s", commitID, err) + log.Printf("websocket for commit %d closed. Err: %s\n", commitID, err) ws.Close() return } case <-sub.CloseNotify(): - log.Println("websocket for commit %d closed by client", commitID) + log.Printf("websocket for commit %d closed by client\n", commitID) ws.Close() return case <-ticker.C: ws.SetWriteDeadline(time.Now().Add(writeWait)) err := ws.WriteMessage(websocket.PingMessage, []byte{}) if err != nil { - log.Println("websocket for commit %d closed. Err: %s", commitID, err) + log.Printf("websocket for commit %d closed. Err: %s\n", commitID, err) ws.Close() return }