Commit b0452381 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Make go fmt happy

parent d186cf65
package main package main
import ( import (
"testing"
"io/ioutil" "io/ioutil"
"os"
"net/http" "net/http"
"net/http/httptest" "net/http/httptest"
"os"
"path/filepath" "path/filepath"
"testing"
) )
func TestIfNoDeployPageExist(t *testing.T) { func TestIfNoDeployPageExist(t *testing.T) {
......
package main package main
import ( import (
"testing" "fmt"
"io/ioutil" "io/ioutil"
"path/filepath" "net/http"
"net/http/httptest" "net/http/httptest"
"os" "os"
"net/http" "path/filepath"
"fmt" "testing"
) )
func TestIfErrorPageIsPresented(t *testing.T) { func TestIfErrorPageIsPresented(t *testing.T) {
...@@ -59,4 +59,3 @@ func TestIfErrorPassedIfNoErrorPageIsFound(t *testing.T) { ...@@ -59,4 +59,3 @@ func TestIfErrorPassedIfNoErrorPageIsFound(t *testing.T) {
t.Error("Page should be response error: ", w.Body.String()) t.Error("Page should be response error: ", w.Body.String())
} }
} }
...@@ -37,7 +37,7 @@ var authSocket = flag.String("authSocket", "", "Optional: Unix domain socket to ...@@ -37,7 +37,7 @@ var authSocket = flag.String("authSocket", "", "Optional: Unix domain socket to
var pprofListenAddr = flag.String("pprofListenAddr", "", "pprof listening address, e.g. 'localhost:6060'") var pprofListenAddr = flag.String("pprofListenAddr", "", "pprof listening address, e.g. 'localhost:6060'")
var relativeUrlRoot = flag.String("relativeUrlRoot", "/", "GitLab relative URL root") var relativeUrlRoot = flag.String("relativeUrlRoot", "/", "GitLab relative URL root")
var documentRoot = flag.String("documentRoot", "public", "Path to static files content") var documentRoot = flag.String("documentRoot", "public", "Path to static files content")
var proxyTimeout = flag.Duration("proxyTimeout", 5 * time.Minute, "Proxy request timeout") var proxyTimeout = flag.Duration("proxyTimeout", 5*time.Minute, "Proxy request timeout")
type httpRoute struct { type httpRoute struct {
method string method string
......
...@@ -366,4 +366,3 @@ func repoPath(t *testing.T) string { ...@@ -366,4 +366,3 @@ func repoPath(t *testing.T) string {
} }
return path.Join(cwd, testRepoRoot, testRepo) return path.Join(cwd, testRepoRoot, testRepo)
} }
package main package main
import ( import (
"testing" "bytes"
"fmt" "fmt"
"path" "io/ioutil"
"net/http/httptest"
"net/http"
"log" "log"
"net/http"
"net/http/httptest"
"os" "os"
"io/ioutil"
"os/exec" "os/exec"
"bytes" "path"
"testing"
) )
func TestDeniedLfsDownload(t *testing.T) { func TestDeniedLfsDownload(t *testing.T) {
...@@ -98,4 +98,3 @@ func deniedXSendfileDownload(t *testing.T, contentFilename string, filePath stri ...@@ -98,4 +98,3 @@ func deniedXSendfileDownload(t *testing.T, contentFilename string, filePath stri
t.Fatal("Unexpected file contents in download") t.Fatal("Unexpected file contents in download")
} }
} }
package main package main
import ( import (
"io/ioutil" "io/ioutil"
"testing" "net/http"
"net/http/httptest" "net/http/httptest"
"os" "os"
"net/http"
"path/filepath" "path/filepath"
"testing"
) )
func TestServingNonExistingFile(t *testing.T) { func TestServingNonExistingFile(t *testing.T) {
......
...@@ -41,7 +41,7 @@ func TestUploadHandlerForwardingRawData(t *testing.T) { ...@@ -41,7 +41,7 @@ func TestUploadHandlerForwardingRawData(t *testing.T) {
fmt.Fprint(w, "RESPONSE") fmt.Fprint(w, "RESPONSE")
}) })
httpRequest, err := http.NewRequest("PATCH", ts.URL + "/url/path", bytes.NewBufferString("REQUEST")) httpRequest, err := http.NewRequest("PATCH", ts.URL+"/url/path", bytes.NewBufferString("REQUEST"))
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
...@@ -123,7 +123,7 @@ func TestUploadHandlerRewritingMultiPartData(t *testing.T) { ...@@ -123,7 +123,7 @@ func TestUploadHandlerRewritingMultiPartData(t *testing.T) {
fmt.Fprint(file, "test") fmt.Fprint(file, "test")
writer.Close() writer.Close()
httpRequest, err := http.NewRequest("PUT", ts.URL + "/url/path", nil) httpRequest, err := http.NewRequest("PUT", ts.URL+"/url/path", nil)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment