summaryrefslogtreecommitdiffstats
path: root/acceptance
diff options
context:
space:
mode:
authorDominic Maraglia <dominic@puppetlabs.com>2011-05-24 16:54:39 -0700
committerDominic Maraglia <dominic@puppetlabs.com>2011-05-24 16:54:39 -0700
commitf50da8bec7280a2816d9d967152ff83a2e888374 (patch)
tree88ce34c5beb006ecdb069020153e9e9a823c65d3 /acceptance
parent9145569f8a11216b9b8f99c1b2dd12da832cf9d4 (diff)
parent646919e5ec1fd5c3071711c091994dcdfcf8bcb5 (diff)
downloadpuppet-f50da8bec7280a2816d9d967152ff83a2e888374.tar.gz
puppet-f50da8bec7280a2816d9d967152ff83a2e888374.tar.xz
puppet-f50da8bec7280a2816d9d967152ff83a2e888374.zip
Merge branch 'test/2.6.x/4123' into 2.7.x
Diffstat (limited to 'acceptance')
-rwxr-xr-xacceptance/tests/resource/service/ticket_4123_should_list_all_running_redhat.sh43
-rwxr-xr-xacceptance/tests/resource/service/ticket_4124_should_list_all_disabled.sh44
2 files changed, 36 insertions, 51 deletions
diff --git a/acceptance/tests/resource/service/ticket_4123_should_list_all_running_redhat.sh b/acceptance/tests/resource/service/ticket_4123_should_list_all_running_redhat.sh
index 1d5e49524..d8576667a 100755
--- a/acceptance/tests/resource/service/ticket_4123_should_list_all_running_redhat.sh
+++ b/acceptance/tests/resource/service/ticket_4123_should_list_all_running_redhat.sh
@@ -4,33 +4,26 @@
# This will facilitate expansion of this tests to include
# the ability to test other OSes
-#if [ -z $1 ] ; then
-# echo "No platform specified"
-# exit 1
-#fi
+RALSH_FILE=/tmp/ralsh-running-list-$$
+SERVICE_FILE=/tmp/service-running-list-$$
-# redhat or centos only
-#if echo $1 | grep -e centos -e redhat
- RALSH_FILE=/tmp/ralsh-running-list-$$
- SERVICE_FILE=/tmp/service-running-list-$$
+puppet resource service | egrep -B1 "ensure.*=>.*'running" | grep 'service {' | gawk -F"'" '{print $2}' | sort > $RALSH_FILE
- puppet resource service | egrep -B1 "ensure\s*=>\s*'running" | grep 'service {' | gawk -F"\'" '{print $2}' | sort > $RALSH_FILE
+if [ -e $SERVICE_FILE ]; then
+ rm $SERVICE_FILE
+fi
- if [ -e $SERVICE_FILE ]; then
- rm $SERVICE_FILE
+SERVICEDIR='/etc/init.d'
+for SERVICE in $( ls $SERVICEDIR | sort | egrep -v "(functions|halt|killall|single|linuxconf)" ) ; do
+ if env -i LANG="$LANG" PATH="$PATH" TERM="$TERM" "${SERVICEDIR}/${SERVICE}" status; then
+ echo $SERVICE >> $SERVICE_FILE
fi
- SERVICEDIR='/etc/init.d'
- for SERVICE in $( ls $SERVICEDIR | sort | egrep -v "(functions|halt|killall|single|linuxconf)" ) ; do
- if env -i LANG="$LANG" PATH="$PATH" TERM="$TERM" "${SERVICEDIR}/${SERVICE}" status; then
- echo $SERVICE >> $SERVICE_FILE
- fi
- done
+done
- if diff $RALSH_FILE $SERVICE_FILE ; then
- echo "Ralsh and system service count agree"
- exit 0
- else
- echo "Ralsh and system service count NOT in agreement"
- exit 1
- fi
-#fi # end redhat/centos
+if diff $RALSH_FILE $SERVICE_FILE ; then
+ echo "Ralsh and system service count agree"
+ exit 0
+else
+ echo "Ralsh and system service count NOT in agreement"
+ exit 1
+fi
diff --git a/acceptance/tests/resource/service/ticket_4124_should_list_all_disabled.sh b/acceptance/tests/resource/service/ticket_4124_should_list_all_disabled.sh
index 7cc463d5e..7e884aff2 100755
--- a/acceptance/tests/resource/service/ticket_4124_should_list_all_disabled.sh
+++ b/acceptance/tests/resource/service/ticket_4124_should_list_all_disabled.sh
@@ -4,34 +4,26 @@
# This will facilitate expansion of this tests to include
# the ability to test other OSes
-#if [ -z $1 ] ; then
-# echo "No platform specified"
-# exit 1
-#fi
+RALSH_FILE=/tmp/ralsh-disabled-list-$$
+SERVICE_FILE=/tmp/service-disabled-list-$$
-# redhat or centos only
-#if echo $1 | grep -e centos -e redhat
- RALSH_FILE=/tmp/ralsh-disabled-list-$$
- SERVICE_FILE=/tmp/service-disabled-list-$$
+puppet resource service | egrep -B2 "enable.*=>.*'false" | grep "service {" | awk -F"'" '{print $2}' | sort > $RALSH_FILE
- # collect all service namevars
- puppet resource service | egrep -B2 "enable\s*=>\s*'false" | grep "service {" | awk -F"'" '{print $2}' | sort > $RALSH_FILE
+if [ -e $SERVICE_FILE ]; then
+ rm $SERVICE_FILE
+fi
- if [ -e $SERVICE_FILE ]; then
- rm $SERVICE_FILE
+SERVICEDIR='/etc/init.d'
+for SERVICE in $( ls $SERVICEDIR | sort | egrep -v "(functions|halt|killall|single|linuxconf)" ) ; do
+ if ! chkconfig $SERVICE; then
+ echo $SERVICE >> $SERVICE_FILE
fi
- SERVICEDIR='/etc/init.d'
- for SERVICE in $( ls $SERVICEDIR | sort | egrep -v "(functions|halt|killall|single|linuxconf)" ) ; do
- if ! chkconfig $SERVICE; then
- echo $SERVICE >> $SERVICE_FILE
- fi
- done
+done
- if diff $RALSH_FILE $SERVICE_FILE ; then
- echo "Ralsh and system service count agree"
- exit 0
- else
- echo "Ralsh and system service count NOT in agreement"
- exit 1
- fi
-#fi # end redhat/centos
+if diff $RALSH_FILE $SERVICE_FILE ; then
+ echo "Ralsh and system service count agree"
+ exit 0
+else
+ echo "Ralsh and system service count NOT in agreement"
+ exit 1
+fi