summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordongwenjuan <dong.wenjuan@zte.com.cn>2016-07-12 10:21:51 +0800
committerdongwenjuan <dong.wenjuan@zte.com.cn>2016-07-18 16:52:34 +0800
commit5a189baf2f99032a0c28992fa47e372d5291c2d2 (patch)
treeb6d9f951fb5ebc7520aab6ae75e354f1b8354e21 /tests
parentcf0c61eb31b65760a36cb0856f9fad58e471f5a6 (diff)
check host status before deleting doctor project
In `cleanup` function, we can't delete doctor project and doctor user before checking host status. Because we use API to get the `host status` under the doctor project. Change-Id: I38c0929eeff9378051e0dcda308734ab7b353509 Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/run.sh b/tests/run.sh
index b383a02a..3e2fbab5 100755
--- a/tests/run.sh
+++ b/tests/run.sh
@@ -269,8 +269,14 @@ cleanup() {
stop_inspector
stop_consumer
+ echo "waiting disabled compute host back to be enabled..."
python ./nova_force_down.py "$COMPUTE_HOST" --unset
+ sleep 180
+ check_host_status "UP"
+ ssh $ssh_opts_cpu "$COMPUTE_USER@$COMPUTE_IP" \
+ "[ -e disable_network.log ] && cat disable_network.log"
sleep 1
+
(
change_to_doctor_user
openstack server list | grep -q " $VM_NAME " && openstack server delete "$VM_NAME"
@@ -287,12 +293,6 @@ cleanup() {
--project "$DOCTOR_PROJECT"
openstack project delete "$DOCTOR_PROJECT"
openstack user delete "$DOCTOR_USER"
-
- echo "waiting disabled compute host back to be enabled..."
- sleep 180
- check_host_status "UP"
- ssh $ssh_opts_cpu "$COMPUTE_USER@$COMPUTE_IP" \
- "[ -e disable_network.log ] && cat disable_network.log"
}