diff --git a/pkging/pkgtest/http.go b/pkging/pkgtest/http.go index ab1bc26..3385d68 100644 --- a/pkging/pkgtest/http.go +++ b/pkging/pkgtest/http.go @@ -236,37 +236,3 @@ func (s Suite) Test_HTTP_File(t *testing.T) { } } - -// -// func (s Suite) Test_HTTP_Dir_Memory_StripPrefix(t *testing.T) { -// r := require.New(t) -// -// fs := NewPkger() -// r.NoError(Folder.Create(fs)) -// -// dir, err := fs.Open("/public") -// r.NoError(err) -// defer dir.Close() -// -// ts := httptest.NewServer(http.StripPrefix("/assets/", http.FileServer(dir))) -// defer ts.Close() -// -// res, err := http.Get(ts.URL + "/assets/images/mark.png") -// r.NoError(err) -// r.Equal(200, res.StatusCode) -// -// b, _ := ioutil.ReadAll(res.Body) -// // r.NoError(err) -// r.Contains(string(b), "!/public/images/mark.png") -// -// res, err = http.Get(ts.URL + "/assets/images/") -// r.NoError(err) -// r.Equal(200, res.StatusCode) -// -// b, _ = ioutil.ReadAll(res.Body) -// // r.NoError(err) -// r.Contains(string(b), `/mark.png`) -// r.NotContains(string(b), `/public`) -// r.NotContains(string(b), `/images`) -// r.NotContains(string(b), `/go.mod`) -// }