feat: +checks flake output

This commit is contained in:
2025-11-03 19:02:42 +00:00
parent e3167ce6e5
commit 43dc59a04f
8 changed files with 154 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
# remove psql from $PATH
dir=$(dirname -- "$(command -v psql)")
PATH=$(printf '%s' "$PATH" | awk -v RS=: -v ORS=: -v d="$dir" '$0!=d{print}')
PATH=${PATH%:}
# clear lookup cache
hash -r 2>/dev/null || true
# temporary disable break on errors, coz in this test we check error-handling scenario
set +e
# try to run migrator without installed psql
migrator 2>/dev/null
migrator_error_code=$?
set -e
log debug "migrator error code: $migrator_error_code"
if [ "$migrator_error_code" -eq 127 ]; then
log notice "test passed"
else
log error "test failed"
fi

View File