]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Revert "Tests for Cinder packages"
authorDmitry Burmistrov <dburmistrov@mirantis.com>
Thu, 25 Sep 2014 09:28:02 +0000 (13:28 +0400)
committerDmitry Burmistrov <dburmistrov@mirantis.com>
Thu, 25 Sep 2014 09:28:02 +0000 (13:28 +0400)
Tests are broken

This reverts commit 4b5bd08753d615dab31c21db27ae5b3eca5df603.

Change-Id: I8f8bf1d46513f143157a3492081a6f413db936ed

tests/runtests.sh [deleted file]

diff --git a/tests/runtests.sh b/tests/runtests.sh
deleted file mode 100755 (executable)
index d26c49f..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/bin/bash -x
-echo "Testing $1"
-
-RES=0
-
-
-function test_cinder_service(){
-  echo "Starting Cinder $1..."
-  /etc/init.d/$1 start
-  sleep 5
-
-  if [ "$1" == "api" ]; then
-    service_running=`netstat -nat | grep $2 | wc -l`
-  else
-      service_running=`ps -Af | grep cinder-$2 | wc -l`
-  fi
-
-  if [ service_running ]; then
-    echo "Cinder API successfully started"
-    /etc/init.d/$1 stop
-  else
-    echo "Can not start Cinder $1 service"
-    RES=1
-  fi
-}
-
-
-function check_file_exists(){
-  if [ ! -f "$1" ]; then
-    RES=1
-  fi
-}
-
-
-function test_cinder_configs(){
-  declare -a files=("/etc/cinder/cinder.conf" "/etc/cinder/api-paste.ini" "/etc/cinder/policy.json")
-  for f in "${files[@]}"
-  do
-    check_file_exists "$f"
- done
-}
-
-
-case $1 in
-  python-cinder)
-    declare -a imports=("cinder" "cinder.volume.drivers.lvm" "cinder.volume.drivers.rbd")
-    for i in "${imports[@]}"
-    do
-      python -c "import $i"
-      if [ $? -ne 0 ]; then
-        RES=1
-        break
-      fi
-    done
-  ;;
-  openstack-cinder)
-    test_cinder_configs
-
-    count=`ls -1 /usr/bin/cinder* 2>/dev/null | wc -l`
-    if [ $count -eq 0 ]; then
-        RES=1
-    fi
-
-    test_cinder_service openstack-cinder-api 8776
-    test_cinder_service openstack-cinder-volume
-    test_cinder_service openstack-cinder-scheduler
-  ;;
-  cinder-common)
-    test_cinder_configs
-    check_file_exists "/usr/bin/cinder-manage"
-  ;;
-  cinder-scheduler)
-    check_file_exists "/usr/bin/cinder-scheduler"
-    test_cinder_service cinder-scheduler
-  ;;
-  cinder-api)
-    check_file_exists "/usr/bin/cinder-api"
-    test_cinder_service cinder-api 8776
-  ;;
-  cinder-volume)
-    check_file_exists "/usr/bin/cinder-api"
-    test_cinder_service cinder-volume
-  ;;
-  openstack-cinder-doc)
-    echo "No test for docs defined"
-  ;;
-  *)
-    echo "Test is not defined, skipping..."
-  ;;
-esac
-
-exit $RES