Dns test refactoring to ping