Handle localhost.localdomain difference in test

it depends on /etc/hosts