Add test preflight and parameterize PostgreSQL connection in Makefile#55
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
PGDATABASE,PGHOST,PGPORT, andPGUSERto be configured instead of hardcoding-d postgres.Description
makefileby addingPGDATABASE,PGHOST,PGPORT, andPGUSERdefaults and a sharedPSQLhelper that respects those variables.test-preflighttarget that checks forpg_proveonPATH, verifies PostgreSQL connectivity using the configured connection variables, and checks that required extensions (pgcrypto,pg_trgm,plpython3u) are installed, emitting actionable error messages on failure.testtarget depend ontest-preflightand invokepg_provewith explicit-h,-p,-U, and-dflags so test execution uses the same connection settings.README.mdandCONTRIBUTING.mdwith a minimal known-good local vs Docker testing matrix and notes thatmake testincludes the preflight; Docker Compose already runsmake testso containerized runs now execute the same preflight checks.Testing
make -n testto validate Makefile behavior, but the dry-run/build was blocked by a missing PGXS include path in the execution environment (/usr/lib/postgresql/16/lib/pgxs/src/makefiles/pgxs.mk).make test-preflightin the containerized environment but the fullmakeexecution could not complete due to the same PGXS/environment limitation, so preflight could not be fully exercised here.Codex Task