From ee082ed548f28a17245aca5d387003a030cded68 Mon Sep 17 00:00:00 2001 From: Mark Bates Date: Tue, 3 Sep 2019 16:45:32 -0400 Subject: [PATCH] dollar and a dream --- pkging/pkgtest/file.go | 2 +- pkging/pkgtest/http.go | 6 +++--- pkging/pkgtest/suite.go | 8 ++++---- pkging/pkgtest/util.go | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pkging/pkgtest/file.go b/pkging/pkgtest/file.go index d42b1a8..11025f1 100644 --- a/pkging/pkgtest/file.go +++ b/pkging/pkgtest/file.go @@ -23,7 +23,7 @@ func (s Suite) Test_File_Info(t *testing.T) { } for _, tt := range table { - t.Run(tt.in, func(st *testing.T) { + s.Run(t, tt.in, func(st *testing.T) { r := require.New(st) r.NoError(s.RemoveAll(mould)) diff --git a/pkging/pkgtest/http.go b/pkging/pkgtest/http.go index b6bf1b1..bb761d9 100644 --- a/pkging/pkgtest/http.go +++ b/pkging/pkgtest/http.go @@ -93,8 +93,6 @@ func (s Suite) Test_HTTP_Dir_IndexHTML(t *testing.T) { r.NoError(err) ip := cur.ImportPath - r.NoError(s.LoadFolder()) - table := []struct { in string req string @@ -106,9 +104,11 @@ func (s Suite) Test_HTTP_Dir_IndexHTML(t *testing.T) { exp := "index.html" for _, tt := range table { - t.Run(tt.in+exp, func(st *testing.T) { + s.Run(t, tt.in+exp, func(st *testing.T) { r := require.New(st) + r.NoError(s.LoadFolder()) + dir, err := s.Open(tt.in) r.NoError(err) diff --git a/pkging/pkgtest/suite.go b/pkging/pkgtest/suite.go index f182293..b09186a 100644 --- a/pkging/pkgtest/suite.go +++ b/pkging/pkgtest/suite.go @@ -297,7 +297,7 @@ func (s Suite) Test_Parse(t *testing.T) { } for _, tt := range table { - t.Run(tt.in, func(st *testing.T) { + s.Run(t, tt.in, func(st *testing.T) { r := require.New(st) pt, err := s.Parse(tt.in) @@ -326,7 +326,7 @@ func (s Suite) Test_Stat_Error(t *testing.T) { } for _, tt := range table { - t.Run(tt.in, func(st *testing.T) { + s.Run(t, tt.in, func(st *testing.T) { r := require.New(st) @@ -360,7 +360,7 @@ func (s Suite) Test_Stat_Dir(t *testing.T) { } for _, tt := range table { - t.Run(tt.in, func(st *testing.T) { + s.Run(t, tt.in, func(st *testing.T) { r := require.New(st) @@ -394,7 +394,7 @@ func (s Suite) Test_Stat_File(t *testing.T) { } for _, tt := range table { - t.Run(tt.in, func(st *testing.T) { + s.Run(t, tt.in, func(st *testing.T) { r := require.New(st) diff --git a/pkging/pkgtest/util.go b/pkging/pkgtest/util.go index 7c7689f..5a71098 100644 --- a/pkging/pkgtest/util.go +++ b/pkging/pkgtest/util.go @@ -26,7 +26,7 @@ func (s Suite) Test_Util_ReadFile(t *testing.T) { } for _, tt := range table { - t.Run(tt.in, func(st *testing.T) { + s.Run(t, tt.in, func(st *testing.T) { r := require.New(st)