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

As yet untested, do not merge