diff options
author | Valery Piashchynski <[email protected]> | 2020-02-07 15:52:57 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-02-07 15:52:57 +0300 |
commit | 785e58f8bea7eb9052babc1dd0e94859328728e5 (patch) | |
tree | 8e301f947211d0a515f79d2b33e85598eb11766c /service/gzip/service_test.go | |
parent | 1f9a12a7b3ab745ee39afe2bbc4a19d21fbe7d91 (diff) |
Update README.md (remove travis, replace with github actions)
Fix innefectual usage of maps
Update headers (canonical usage)
Add golangci-lint check to github actions and go 1.13
Diffstat (limited to 'service/gzip/service_test.go')
-rw-r--r-- | service/gzip/service_test.go | 53 |
1 files changed, 25 insertions, 28 deletions
diff --git a/service/gzip/service_test.go b/service/gzip/service_test.go index 6a2ee382..9801860f 100644 --- a/service/gzip/service_test.go +++ b/service/gzip/service_test.go @@ -7,16 +7,13 @@ import ( "github.com/spiral/roadrunner/service" rrhttp "github.com/spiral/roadrunner/service/http" "github.com/stretchr/testify/assert" - "io/ioutil" - "net/http" - "os" "testing" ) type testCfg struct { gzip string httpCfg string - static string + //static string target string } @@ -34,24 +31,24 @@ func (cfg *testCfg) Unmarshal(out interface{}) error { return json.Unmarshal([]byte(cfg.target), out) } -func get(url string) (string, *http.Response, error) { - r, err := http.Get(url) - if err != nil { - return "", nil, err - } - - b, err := ioutil.ReadAll(r.Body) - if err != nil { - return "", nil, err - } - - err = r.Body.Close() - if err != nil { - return "", nil, err - } - - return string(b), r, err -} +//func get(url string) (string, *http.Response, error) { +// r, err := http.Get(url) +// if err != nil { +// return "", nil, err +// } +// +// b, err := ioutil.ReadAll(r.Body) +// if err != nil { +// return "", nil, err +// } +// +// err = r.Body.Close() +// if err != nil { +// return "", nil, err +// } +// +// return string(b), r, err +//} func Test_Disabled(t *testing.T) { logger, _ := test.NewNullLogger() @@ -115,9 +112,9 @@ func Test_Disabled(t *testing.T) { // //header should contain content-encoding:gzip because content-length > gziphandler.DefaultMinSize // } -func tmpDir() string { - p := os.TempDir() - r, _ := json.Marshal(p) - - return string(r) -} +//func tmpDir() string { +// p := os.TempDir() +// r, _ := json.Marshal(p) +// +// return string(r) +//} |