Skip to content

Commit

Permalink
Add test for introspection warnings closes #1969
Browse files Browse the repository at this point in the history
  • Loading branch information
Jolg42 committed Apr 8, 2020
1 parent 5cdda70 commit ff51b09
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Binary file not shown.
19 changes: 19 additions & 0 deletions cli/prisma2/fixtures/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,25 @@ if [[ ${VERSION} != *"@prisma/cli"* ]]; then
exit 1
fi

#
# Test introspection output with warnings
#
cd fixtures/introspection-warnings
INTROSPECTION=$(node ../../build/index.js introspect --url="file:./warnings.db")
if [[ ${INTROSPECTION} != *"column_name_that_becomes_empty_string"* ]]; then
echo "prisma introspect column_name_that_becomes_empty_string is broken"
exit 1
fi
if [[ ${INTROSPECTION} != *"no_unique_identifier"* ]]; then
echo "prisma introspect no_unique_identifier is broken"
exit 1
fi
if [[ ${INTROSPECTION} != *"unsupported_type"* ]]; then
echo "prisma introspect unsupported_type is broken"
exit 1
fi
cd ../../

#
# Test generate output command
#
Expand Down

0 comments on commit ff51b09

Please sign in to comment.