From bb0a89a0fd94d1b1a9cf456c6094ed73e701c61f Mon Sep 17 00:00:00 2001 From: Adam Scarr Date: Thu, 9 Aug 2018 16:28:08 +1000 Subject: [PATCH] exclude generated code from tests --- .circleci/test.sh | 5 +++-- graphql/introspection/type_test.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.circleci/test.sh b/.circleci/test.sh index dc8637f8b2..f904da7bef 100755 --- a/.circleci/test.sh +++ b/.circleci/test.sh @@ -3,7 +3,8 @@ set -eu echo "### go generating" -go generate ./... +go generate $(go list ./... | grep -v codegen/tests) + if [[ $(git --no-pager diff) ]] ; then echo "you need to run go generate" git --no-pager diff @@ -11,7 +12,7 @@ if [[ $(git --no-pager diff) ]] ; then fi echo "### running testsuite" -go test -race ./... +go test -race $(go list ./... | grep -v codegen/tests) echo "### linting" gometalinter --vendor ./... diff --git a/graphql/introspection/type_test.go b/graphql/introspection/type_test.go index e3a4613c5d..8c2a004fc0 100644 --- a/graphql/introspection/type_test.go +++ b/graphql/introspection/type_test.go @@ -21,7 +21,7 @@ func TestType(t *testing.T) { } t.Run("name", func(t *testing.T) { - require.Equal(t, "Query", schemaType.Name()) + require.Equal(t, "Query", *schemaType.Name()) }) t.Run("description", func(t *testing.T) {