Explorar el Código

avoiding conflict with built-in function test

Milen Pavlov hace 12 años
padre
commit
72ea2088a6
Se han modificado 1 ficheros con 10 adiciones y 10 borrados
  1. 10 10
      extra/centos/test_celeryd.sh

+ 10 - 10
extra/centos/test_celeryd.sh

@@ -6,7 +6,7 @@
 SERVICE="celeryd"
 SERVICE_CMD="sudo /sbin/service $SERVICE"
 
-test() {
+run_test() {
     local msg="$1"
     local cmd="$2"
     local expected_retval="${3:-0}"
@@ -28,14 +28,14 @@ test() {
     fi
 }
 
-test "stop should succeed" "$SERVICE_CMD stop" 0
-test "status on a stopped service should return 1" "$SERVICE_CMD status" 1
-test "stopping a stopped celery should not fail" "$SERVICE_CMD stop" 0
-test "start should succeed" "$SERVICE_CMD start" 0
-test "status on a running service should return 0" "$SERVICE_CMD status" 0
-test "starting a running service should fail" "$SERVICE_CMD start" 1
-test "restarting a running service should succeed" "$SERVICE_CMD restart" 0
-test "status on a restarted service should return 0" "$SERVICE_CMD status" 0
-test "stop should succeed" "$SERVICE_CMD stop" 0
+run_test "stop should succeed" "$SERVICE_CMD stop" 0
+run_test "status on a stopped service should return 1" "$SERVICE_CMD status" 1
+run_test "stopping a stopped celery should not fail" "$SERVICE_CMD stop" 0
+run_test "start should succeed" "$SERVICE_CMD start" 0
+run_test "status on a running service should return 0" "$SERVICE_CMD status" 0
+run_test "starting a running service should fail" "$SERVICE_CMD start" 1
+run_test "restarting a running service should succeed" "$SERVICE_CMD restart" 0
+run_test "status on a restarted service should return 0" "$SERVICE_CMD status" 0
+run_test "stop should succeed" "$SERVICE_CMD stop" 0
 
 echo "All tests passed!"