From 2e1f0b9ede3302cd7af13f14d8c816a042a6fd74 Mon Sep 17 00:00:00 2001 From: Christoph Galuschka Date: Sep 25 2012 19:30:00 +0000 Subject: Merge remote branch 'upstream/master' --- diff --git a/tests/p_lsof/10-test_lsof.sh b/tests/p_lsof/10-test_lsof.sh index 52b6501..c881eb7 100755 --- a/tests/p_lsof/10-test_lsof.sh +++ b/tests/p_lsof/10-test_lsof.sh @@ -9,6 +9,9 @@ if ! [ "$sshd_status" ] then service sshd start fi +t_InstallPackage openssh-server openssh-clients +t_ServiceControl sshd start + sshd_port_listening=`lsof -i:22 | grep LISTEN` if [ "$sshd_port_listening" ] then diff --git a/tests/p_perl/0-install_perl.sh b/tests/p_perl/0-install_perl.sh new file mode 100755 index 0000000..3ac8c7e --- /dev/null +++ b/tests/p_perl/0-install_perl.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Author: Madhurranjan Mohaan + +t_Log "Running $0 - installing perl" + +# Install perl +t_InstallPackage perl diff --git a/tests/p_perl/10-test_perl.sh b/tests/p_perl/10-test_perl.sh new file mode 100755 index 0000000..4523964 --- /dev/null +++ b/tests/p_perl/10-test_perl.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# Author: Madhurranjan Mohaan + +# Check perl installation + +t_Log "Running $0 - checking perl installation" + +perl --version &>/dev/null +t_CheckExitStatus $? diff --git a/tests/p_perl/20-run_perl_script.sh b/tests/p_perl/20-run_perl_script.sh new file mode 100755 index 0000000..c1ee3c6 --- /dev/null +++ b/tests/p_perl/20-run_perl_script.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Author: Madhurranjan Mohaan + +t_Log "Running $0 - Testing perl by running it against a basic file" + +echo 'print "helloworld perlpackage"' > testfile +perl testfile + +t_CheckExitStatus $? diff --git a/tests/p_telnet/0-install_telnet.sh b/tests/p_telnet/0-install_telnet.sh new file mode 100755 index 0000000..efc877d --- /dev/null +++ b/tests/p_telnet/0-install_telnet.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Author: Madhurranjan Mohaan + +t_Log "Running $0 - installing telnet" + +# Install Telnet +t_InstallPackage telnet diff --git a/tests/p_telnet/10-test_telnet.sh b/tests/p_telnet/10-test_telnet.sh new file mode 100755 index 0000000..5e42684 --- /dev/null +++ b/tests/p_telnet/10-test_telnet.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Author: Madhurranjan Mohaan + +t_Log "Running $0 - testing telnet against ssh port" +t_Log "Making sure port 22 is listening by calling ssh installer" + +t_InstallPackage openssh-server openssh-clients +t_ServiceControl sshd start + +telnet_port_22=`telnet 127.0.0.1 22 << EOH +EOH` +echo $telnet_port_22 | grep "Escape character is '^]'" +t_CheckExitStatus $?