diff options
-rw-r--r-- | docs/development/overview/testing.rst | 24 | ||||
-rw-r--r-- | doctor_tests/installer/__init__.py | 4 | ||||
-rw-r--r-- | doctor_tests/installer/apex.py | 1 | ||||
-rw-r--r-- | doctor_tests/installer/mcp.py | 3 | ||||
-rw-r--r-- | tox.ini | 1 |
5 files changed, 32 insertions, 1 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/__init__.py b/doctor_tests/installer/__init__.py index 31fce754..ee44018c 100644 --- a/doctor_tests/installer/__init__.py +++ b/doctor_tests/installer/__init__.py @@ -24,6 +24,10 @@ OPTS = [ default='root', help='the user name for login installer server', required=True), + cfg.StrOpt('key_file', + default=os.environ.get('SSH_KEY', None), + help='the key for user to login installer server', + required=False), ] diff --git a/doctor_tests/installer/apex.py b/doctor_tests/installer/apex.py index 1ce3eb65..c851b2ac 100644 --- a/doctor_tests/installer/apex.py +++ b/doctor_tests/installer/apex.py @@ -19,6 +19,7 @@ class ApexInstaller(BaseInstaller): super(ApexInstaller, self).__init__(conf, log) self.client = SSHClient(self.conf.installer.ip, self.conf.installer.username, + key_filename=self.conf.installer.key_file, look_for_keys=True) self.key_file = None self.controllers = list() diff --git a/doctor_tests/installer/mcp.py b/doctor_tests/installer/mcp.py index 8ba9f000..e7e41dbe 100644 --- a/doctor_tests/installer/mcp.py +++ b/doctor_tests/installer/mcp.py @@ -22,7 +22,8 @@ class McpInstaller(BaseInstaller): self.key_file = self.get_ssh_key_from_installer() self.client = SSHClient(self.conf.installer.ip, self.node_user_name, - key_filename=self.key_file) + key_filename=self.key_file, + look_for_keys=True) self.controllers = list() self.controller_clients = list() @@ -30,6 +30,7 @@ passenv = INSTALLER_IP INSPECTOR_TYPE TEST_CASE + SSH_KEY changedir = {toxinidir}/doctor_tests commands = doctor-test |