Skip to content

Commit

Permalink
exclude generated code from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Scarr committed Aug 9, 2018
1 parent c2bcff7 commit bb0a89a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .circleci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
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
exit 1
fi

echo "### running testsuite"
go test -race ./...
go test -race $(go list ./... | grep -v codegen/tests)

echo "### linting"
gometalinter --vendor ./...
2 changes: 1 addition & 1 deletion graphql/introspection/type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit bb0a89a

Please sign in to comment.