automatic test running and sending to webapp
diff --git a/scripts/run_test.sh b/scripts/run_test.sh
index 483f583..94612ba 100644
--- a/scripts/run_test.sh
+++ b/scripts/run_test.sh
@@ -3,6 +3,7 @@
 EXTERNAL_IP=$3
 KEY_FILE_NAME=$4
 
+
 if [ ! -z $5 ]
 then
     FILE_TO_TEST=$5
@@ -36,7 +37,7 @@
 	image_name=$IMAGE_NAME
     counter=0
 
-	while [ $image_state != "active" ] ; do
+	while [ ! $image_state eq "active" ] ; do
 		sleep 1
 		image_state=$(glance image-list | grep $image_name | awk '{print $12}')
 		echo $image_state
@@ -88,7 +89,7 @@
 	done
 }
 
-source run_vm.sh $FUEL_MASTER_IP $FUEL_MASTER_PASSWD $EXTERNAL_IP
+bash run_vm.sh $FUEL_MASTER_IP $FUEL_MASTER_PASSWD $EXTERNAL_IP
 source `get_openrc`
 list=$(nova list)
 if [ "$list" == "" ]; then
@@ -118,10 +119,15 @@
 echo "Floating IP has been obtained"
 source `prepare_vm`
 echo "VM has been prepared"
-ssh -i $KEY_FILE_NAME ubuntu@$VM_IP \
-    "cd /tmp/io_scenario; sudo bash ../single_node_test_short.sh $FILE_TO_TEST $FILE_TO_STORE_RESULTS"
-nova delete $VM_NAME
-wait_vm_deleted
-echo "$VM_NAME has been deleted successfully"
-cinder delete $VOL_ID
-echo "Volume has been deleted $VOL_ID"
+
+# sudo bash ../single_node_test_short.sh $FILE_TO_TEST $FILE_TO_STORE_RESULTS
+
+ssh $SSH_OPTS -i $KEY_FILE_NAME ubuntu@$VM_IP \
+    "cd /tmp/io_scenario; echo 'results' > $FILE_TO_STORE_RESULTS; \
+    curl -X POST -d @$FILE_TO_STORE_RESULTS http://http://172.16.52.80/api/test --header 'Content-Type:application/json'"
+
+# nova delete $VM_NAME
+# wait_vm_deleted
+# echo "$VM_NAME has been deleted successfully"
+# cinder delete $VOL_ID
+# echo "Volume has been deleted $VOL_ID"