Blame tests/p_jwhois/jwhois_test.sh

Athmane Madjoudj d6479e
#!/bin/sh
Athmane Madjoudj d6479e
# Author: Athmane Madjoudj <athmanem@gmail.com>
Athmane Madjoudj d6479e
Athmane Madjoudj d6479e
t_Log "Running $0 - check that jwhois can connect to whois server and get the info."
Athmane Madjoudj d6479e
Athmane Madjoudj d6479e
# Dummy whois server
Athmane Madjoudj d6479e
echo 'tf_jwhois_test_response' | nc -l 43 &
Athmane Madjoudj d6479e
sleep 1
Athmane Madjoudj d6479e
Athmane Madjoudj d6479e
whois -h 127.0.0.1 domain.tld | grep -q 'tf_jwhois_test_response'
Athmane Madjoudj d6479e
Athmane Madjoudj d6479e
t_CheckExitStatus $?