fix(upgrade): test for ability to connect to localhost if rewrite test fails

(this PR replaces #6962 - fixes commit msg)

Fixes #6888