test: use loopback address explicitly for server tests

Avoid exposing servers on the external network when possible.