Bug fix: treat a successful PG conn and auth as a preflight success #818
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.
Currently, if the PostgreSQL preflight check is able to connect to the
DB and authenticate (due to a pg_hba trust entry, for example) but is
unable to find the not-expected-to-be-there database name in question,
it treats the preflight connection check as a failure.
An example of such a condition would be configuring Chef Server and
Delivery on the same node and configuring Chef Server to use Delivery's
database. Delivery's pg_hba.conf trusts local connections, so a
chef-server-ctl reconfigure
will fail the preflight checks becauseit connects to the DB but fails to find the fake database.
This change treats a successful connection and auth as a success during
pre-flight and also adds tests for the
#connectivity_validation
methodwhich previously had none.