bstinson / centos / t_functional

Forked from centos/t_functional 4 years ago
Clone

Blame tests/p_jwhois/jwhois_test.sh

Athmane Madjoudj d6479e
#!/bin/sh
Athmane Madjoudj d6479e
# Author: Athmane Madjoudj <athmanem@gmail.com>
Athmane Madjoudj d6479e
Pablo Greco 41fef5
if [ "$centos_ver" -ge 8 ] ;then
Pablo Greco 41fef5
  exit 0
Pablo Greco 41fef5
fi
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 $?