summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordongwenjuan <dong.wenjuan@zte.com.cn>2016-06-16 17:30:41 +0800
committerdongwenjuan <dong.wenjuan@zte.com.cn>2016-06-17 08:38:23 +0800
commit1b42fe2306b18996f53e5d987d7c5d106a7325f3 (patch)
tree7a06e512473b813d5f6821754df4cb4739c6ebf7 /tests
parent0a0d77039d4d2ece184461b78e65a7c6737d4b5a (diff)
Before deleting the instance, check if the instance exists
The instance may not exist if there is a error before creating instance or it failed to create, run the `cleanup` to delete the non-existent instance will raise an error Change-Id: I13e4b63be952967605093a4427f5b0ac4be280c3 Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/run.sh b/tests/run.sh
index 241d6898..a2656aae 100755
--- a/tests/run.sh
+++ b/tests/run.sh
@@ -226,7 +226,7 @@ cleanup() {
python ./nova_force_down.py "$COMPUTE_HOST" --unset
sleep 1
- nova delete "$VM_NAME"
+ nova list | grep -q " $VM_NAME " && nova delete "$VM_NAME"
sleep 1
alarm_id=$(ceilometer alarm-list | grep " $ALARM_NAME " | awk '{print $2}')
sleep 1