From 679668e3c0898eb58864c68b117fd98bad4b49a8 Mon Sep 17 00:00:00 2001 From: Karthic Rao Date: Sun, 30 Aug 2015 18:57:20 +0530 Subject: [PATCH] removed redundant comment lines --- config/setup/fastcgi_test.go | 10 ++++++++++ middleware/browse/browse_test.go | 6 ++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/config/setup/fastcgi_test.go b/config/setup/fastcgi_test.go index f32f84d3..661b92e5 100644 --- a/config/setup/fastcgi_test.go +++ b/config/setup/fastcgi_test.go @@ -51,6 +51,16 @@ func TestFastcgiParse(t *testing.T) { SplitPath: ".php", IndexFiles: []string{"index.php"}, }}}, + {`fastcgi / 127.0.0.1:9001 { + split .html + }`, + false, []fastcgi.Rule{{ + Path: "/", + Address: "127.0.0.1:9001", + Ext: "", + SplitPath: ".html", + IndexFiles: []string{}, + }}}, } for i, test := range tests { c := NewTestController(test.inputFastcgiConfig) diff --git a/middleware/browse/browse_test.go b/middleware/browse/browse_test.go index 13894a8d..b396fda1 100644 --- a/middleware/browse/browse_test.go +++ b/middleware/browse/browse_test.go @@ -1,7 +1,6 @@ package browse import ( - //"bytes" "encoding/json" "github.com/mholt/caddy/middleware" "net/http" @@ -191,7 +190,7 @@ func TestBrowseJson(t *testing.T) { } actualJsonResponseString := rec.Body.String() - //t.Logf("json response body: %s\n", respBody) + //generating the listing to compare it with the response body file, err := os.Open(b.Root + req.URL.Path) if err != nil { @@ -233,12 +232,11 @@ func TestBrowseJson(t *testing.T) { listing.Order = "asc" listing.applySort() - //var buf bytes.Buffer marsh, err := json.Marshal(listing.Items) if err != nil { t.Fatalf("Unable to Marshal the listing ") } - //t.Logf("json value: %s\n", string(marsh)) + expectedJsonString := string(marsh) if actualJsonResponseString != expectedJsonString { t.Errorf("Json response string doesnt match the expected Json response ")