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

Fixes #6888
Merge pull request #7006 from mrclay/beck24-rewrite_error_test

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