From: wenjuan dong Date: Fri, 9 Sep 2016 00:07:01 +0000 (+0000) Subject: Merge "Run the tests with existing image" X-Git-Tag: danube.1.RC1~46 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=194f2ea113c07ff6c66e67b368abce0bfa22f595;hp=34e593954e048a86c90dd851de6a84c7329a937b;p=doctor.git Merge "Run the tests with existing image" --- diff --git a/docs/design/notification-alarm-evaluator.rst b/docs/design/notification-alarm-evaluator.rst index 06a082be..d1bf787a 100644 --- a/docs/design/notification-alarm-evaluator.rst +++ b/docs/design/notification-alarm-evaluator.rst @@ -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 ============================ diff --git a/docs/design/port-data-plane-status.rst b/docs/design/port-data-plane-status.rst index d071b7ba..06cfc3c6 100644 --- a/docs/design/port-data-plane-status.rst +++ b/docs/design/port-data-plane-status.rst @@ -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 diff --git a/docs/scenarios/functest/doctor-scenario-in-functest.rst b/docs/scenarios/functest/doctor-scenario-in-functest.rst index 29af7390..3c021d61 100644 --- a/docs/scenarios/functest/doctor-scenario-in-functest.rst +++ b/docs/scenarios/functest/doctor-scenario-in-functest.rst @@ -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. diff --git a/tests/run.sh b/tests/run.sh index 5ee4b6f6..99e8feff 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -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