From d96dfd3e3727e2d1eb5121cd0b5cfa2705d36084 Mon Sep 17 00:00:00 2001 From: Mark Bates Date: Tue, 5 Nov 2019 11:52:13 -0500 Subject: [PATCH] always be tidying --- parser/parser_test.go | 9 +++++++++ pkging/pkgtest/testdata/ref/.gitignore | 1 - pkging/pkgtest/testdata/ref/go.sum | 16 ++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) delete mode 100644 pkging/pkgtest/testdata/ref/.gitignore create mode 100644 pkging/pkgtest/testdata/ref/go.sum diff --git a/parser/parser_test.go b/parser/parser_test.go index 2b2702f..4ec3512 100644 --- a/parser/parser_test.go +++ b/parser/parser_test.go @@ -2,6 +2,7 @@ package parser_test import ( "os" + "os/exec" "path/filepath" "strings" "testing" @@ -14,6 +15,10 @@ import ( ) func Test_Parser_Ref(t *testing.T) { + defer func() { + c := exec.Command("go", "mod", "tidy", "-v") + c.Run() + }() r := require.New(t) ref, err := pkgtest.NewRef() @@ -55,6 +60,10 @@ func Test_Parser_Example_HTTP(t *testing.T) { root := filepath.Join(cur.Dir, "examples", "http", "pkger") r.NoError(os.Chdir(root)) + defer func() { + c := exec.Command("go", "mod", "tidy", "-v") + c.Run() + }() her, err := here.Dir(".") r.NoError(err) diff --git a/pkging/pkgtest/testdata/ref/.gitignore b/pkging/pkgtest/testdata/ref/.gitignore deleted file mode 100644 index 08cb523..0000000 --- a/pkging/pkgtest/testdata/ref/.gitignore +++ /dev/null @@ -1 +0,0 @@ -go.sum diff --git a/pkging/pkgtest/testdata/ref/go.sum b/pkging/pkgtest/testdata/ref/go.sum new file mode 100644 index 0000000..aaf55e6 --- /dev/null +++ b/pkging/pkgtest/testdata/ref/go.sum @@ -0,0 +1,16 @@ +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=