Merge "Run the tests with existing image"
authorwenjuan dong <dong.wenjuan@zte.com.cn>
Fri, 9 Sep 2016 00:07:01 +0000 (00:07 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Fri, 9 Sep 2016 00:07:01 +0000 (00:07 +0000)
docs/design/notification-alarm-evaluator.rst
docs/design/port-data-plane-status.rst
docs/scenarios/functest/doctor-scenario-in-functest.rst
tests/run.sh

index 06a082b..d1bf787 100644 (file)
@@ -1,12 +1,6 @@
 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
 .. http://creativecommons.org/licenses/by/4.0
 
-..
- This work is licensed under a Creative Commons Attribution 3.0 Unported
- License.
-
- http://creativecommons.org/licenses/by/3.0/legalcode
-
 ============================
 Notification Alarm Evaluator
 ============================
index d071b7b..06cfc3c 100644 (file)
@@ -1,8 +1,5 @@
-..
- This work is licensed under a Creative Commons Attribution 3.0 Unported
- License.
-
- http://creativecommons.org/licenses/by/3.0/legalcode
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
 
 ====================================
 Port data plane status
index 29af739..3c021d6 100644 (file)
@@ -92,20 +92,28 @@ Test case
 
 Functest will call the "run.sh" script in Doctor to run the test job.
 
-Currently, only 'Apex' and 'local' installer are supported.
+Currently, only 'Apex' and 'local' installer are supported. The test also
+can run successfully in 'fuel' installer with the modification of some
+configurations of OpenStack in the script. But still need 'fuel' installer
+to support these configurations.
 
 The "run.sh" script will execute the following steps.
 
-Firstly, prepare image for booting VM, then create a test project and test
+Firstly, get the installer ip according to the installer type. Then ssh to
+the installer node to get the private key for accessing to the cloud. As
+'fuel' installer, ssh to the controller node to modify nova and ceilometer
+configurations.
+
+Secondly, prepare image for booting VM, then create a test project and test
 user (both default to doctor) for the Doctor tests.
 
-Secondly, boot a VM under the doctor project and check the VM status to verify
+Thirdly, boot a VM under the doctor project and check the VM status to verify
 that the VM is launched completely. Then get the compute host info where the VM
 is launched to verify connectivity to the target compute host. Get the consumer
 ip according to the route to compute ip and create an alarm event in Ceilometer
 using the consumer ip.
 
-Thirdly, the Doctor components are started, and, based on the above preparation,
+Fourthly, the Doctor components are started, and, based on the above preparation,
 a failure is injected to the system, i.e. the network of compute host is
 disabled for 3 minutes. To ensure the host is down, the status of the host
 will be checked.
index 5ee4b6f..99e8fef 100755 (executable)
@@ -457,7 +457,12 @@ wait_for_vm_launch() {
     while [[ ${count} -lt 60 ]]
     do
         state=$(openstack $as_doctor_user server list | grep " $VM_NAME " | awk '{print $6}')
-        [[ "$state" == "ACTIVE" ]] && return 0
+        if [[ "$state" == "ACTIVE" ]]; then
+            # NOTE(cgoncalves): sleeping for a bit to stabilize
+            # See python-openstackclient/functional/tests/compute/v2/test_server.py:wait_for_status
+            sleep 5
+            return 0
+        fi
         [[ "$state" == "ERROR" ]] && echo "vm state is ERROR" && exit 1
         count=$(($count+1))
         sleep 1
@@ -570,13 +575,12 @@ create_test_user
 echo "creating VM..."
 boot_vm
 wait_for_vm_launch
-openstack $as_doctor_user server show $VM_NAME
 
 echo "get computer host info..."
 get_compute_host_info
 
 echo "creating alarm..."
-#TODO: change back to use, network problems depends on infra and installers 
+#TODO: change back to use, network problems depends on infra and installers
 #get_consumer_ip
 create_alarm