summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/development/overview/testing.rst24
-rw-r--r--doctor_tests/installer/base.py2
-rw-r--r--doctor_tests/main.py2
-rw-r--r--doctor_tests/scenario/fault_management.py2
4 files changed, 27 insertions, 3 deletions
diff --git a/docs/development/overview/testing.rst b/docs/development/overview/testing.rst
index 98be43e9..ba0546eb 100644
--- a/docs/development/overview/testing.rst
+++ b/docs/development/overview/testing.rst
@@ -29,6 +29,18 @@ OpenStack services.
.. _OpenStackClient Configuration: https://docs.openstack.org/python-openstackclient/latest/configuration/index.html
+Doctor now supports different test cases and for that you might want to
+export TEST_CASE with different values:
+
+.. code-block:: bash
+
+ #Fault management (default)
+ export TEST_CASE='fault_management'
+ #Maintenance (requires 3 compute nodes)
+ export TEST_CASE='maintenance'
+ #Run both tests cases
+ export TEST_CASE='all'
+
Run Python Test Script
~~~~~~~~~~~~~~~~~~~~~~
@@ -45,6 +57,18 @@ environment and then run the test.
.. _doctor.sample.conf: https://git.opnfv.org/doctor/tree/etc/doctor.sample.conf
+In OPNFV Apex jumphost you can run Doctor testing as follows using tox:
+
+.. code-block:: bash
+
+ #Before Gambia: overcloudrc.v3
+ source overcloudrc
+ export INSTALLER_IP=${INSTALLER_IP}
+ export INSTALLER_TYPE=${INSTALLER_TYPE}
+ git clone https://gerrit.opnfv.org/gerrit/doctor
+ cd doctor
+ sudo -E tox
+
Run Functest Suite
==================
diff --git a/doctor_tests/installer/base.py b/doctor_tests/installer/base.py
index 76bbeb1e..f312130a 100644
--- a/doctor_tests/installer/base.py
+++ b/doctor_tests/installer/base.py
@@ -63,7 +63,7 @@ class BaseInstaller(object):
cmd = ("ssh -o UserKnownHostsFile=/dev/null"
" -o StrictHostKeyChecking=no"
" -i %s %s@%s -R %s:localhost:%s"
- " sleep 600 > ssh_tunnel.%s.log"
+ " sleep 600 > ssh_tunnel.%s"
" 2>&1 < /dev/null &"
% (self.key_file,
self.node_user_name,
diff --git a/doctor_tests/main.py b/doctor_tests/main.py
index 61facb61..79480ca1 100644
--- a/doctor_tests/main.py
+++ b/doctor_tests/main.py
@@ -67,7 +67,7 @@ class DoctorTest(object):
# injecting host failure...
# NOTE (umar) add INTERFACE_NAME logic to host injection
self.fault_management.start()
- time.sleep(10)
+ time.sleep(30)
# verify the test results
# NOTE (umar) copy remote monitor.log file when monitor=collectd
diff --git a/doctor_tests/scenario/fault_management.py b/doctor_tests/scenario/fault_management.py
index b1fe8099..f8f53e8e 100644
--- a/doctor_tests/scenario/fault_management.py
+++ b/doctor_tests/scenario/fault_management.py
@@ -32,7 +32,7 @@ dev=$(sudo ip a | awk '/ {compute_ip}\//{{print $NF}}')
sleep 1
sudo ip link set $dev down
echo "doctor set link down at" $(date "+%s.%N")
-sleep 10
+sleep 30
sudo ip link set $dev up
sleep 1
"""