File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed
Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -245,7 +245,7 @@ class PgCodeGen private (
245245
246246 def run (): Future [List [File ]] =
247247 for
248- _ <- Future {
248+ _ <- Future .fromTry {
249249 if debug then println(" Running migrations..." )
250250
251251 Zone :
Original file line number Diff line number Diff line change @@ -90,3 +90,17 @@ docker run --rm --name codegentest -e POSTGRES_PASSWORD=postgres -p 5555:5432 -d
9090 -force=true && echo " ✅ Code generation for provided connection ok." ) || (docker rm -f codegentest; exit 1)
9191
9292docker rm -f codegentest
93+
94+ echo " ⏳Process should fail on running invalid sql"
95+ if $CODEGEN_BIN \
96+ -use-docker-image=postgres:17-alpine \
97+ -output-dir=test-generated \
98+ -pkg-name=generated \
99+ -exclude-tables=unsupported_yet \
100+ -source-dir=test/migrations_invalid \
101+ -force=true; then
102+ echo " ❌ Process did not fail as expected"
103+ exit 1
104+ else
105+ echo " ✅ Process failed as expected"
106+ fi
Original file line number Diff line number Diff line change 1+ syntax error;
You can’t perform that action at this time.
0 commit comments