From 338bb8f5f7a41c114bcc9de2975edeadf3e66535 Mon Sep 17 00:00:00 2001 From: Madhurranjan Mohaan Date: Sep 15 2012 19:39:55 +0000 Subject: Added tests to install subversion, check subversion version and create/verify a subversion repository --- diff --git a/tests/p_subversion/0-install_subversion.sh b/tests/p_subversion/0-install_subversion.sh new file mode 100755 index 0000000..8afb84a --- /dev/null +++ b/tests/p_subversion/0-install_subversion.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# Author: Madhurranjan Mohaan + +t_Log "Running $0 - installing subversion" + +# Install subversion subversion +if [ $centos_ver == '6' ] + then + t_InstallPackage subversion +else + t_Log "This test is skipped in CentOS5." +fi diff --git a/tests/p_subversion/10-test_subversion.sh b/tests/p_subversion/10-test_subversion.sh new file mode 100755 index 0000000..4684a79 --- /dev/null +++ b/tests/p_subversion/10-test_subversion.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Author: Madhurranjan Mohaan + +# Check subversion installation + +t_Log "Running $0 - checking subversion installation" + +if [ $centos_ver == '6' ] + then + svn --version &>/dev/null + ret_val=$? +else + t_Log "This test is skipped in CentOS5." + ret_val=0 +fi + +t_CheckExitStatus $ret_val diff --git a/tests/p_subversion/15-test_subversion.sh b/tests/p_subversion/15-test_subversion.sh new file mode 100755 index 0000000..6800eab --- /dev/null +++ b/tests/p_subversion/15-test_subversion.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# Author: Madhurranjan Mohaan + +t_Log "Running $0 - testing a local subversion repository creation operation" + +if [ $centos_ver == '6' ] + then + temp_dir="/tmp/svnrepo" + temp_repo="tmprepo" + rm -rf $temp_dir/$temp_repo + mkdir -p $temp_dir + cd $temp_dir + svnadmin create $temp_repo + +#verify repo using svnadmin + if [ "svnadmin verify $temp_dir/$temp_repo | grep 'Verified revision 0'" ] + then + ret_val=0 + else + ret_val=1 + fi +else + t_Log "This test is skipped in CentOS5." + ret_val=0 +fi + +t_CheckExitStatus $ret_val