diff options
author | Alina Nesterova <zemuvier@gmail.com> | 2016-06-24 17:29:46 +0300 |
---|---|---|
committer | Alina Nesterova <zemuvier@gmail.com> | 2016-07-02 13:15:51 +0300 |
commit | 053e58fc4654b1cb60a21b80d8f12d0f3171eaea (patch) | |
tree | d19ce9a5932e693ec51225194d5ece1d6a9427dc | |
parent | f0f93883b302d1ef4f9255a8250ced441ed9f7ee (diff) | |
download | python-saharaclient-053e58fc4654b1cb60a21b80d8f12d0f3171eaea.tar.gz |
Remove unused functional tests
Replace this tests with tests in sahara-tests
Depends-on: I2fc73686fcbcb458fd22cef3fe335fd4f690302d
Change-Id: I590a91277f411f5bfa9f7dbf3bea2780c666bbc0
-rw-r--r-- | releasenotes/notes/remove-functional-tests-c4b9d43c2c32d121.yaml | 4 | ||||
-rw-r--r-- | saharaclient/tests/functional/__init__.py | 0 | ||||
-rw-r--r-- | saharaclient/tests/functional/base.py | 38 | ||||
-rwxr-xr-x | saharaclient/tests/functional/hooks/post_test_hook.sh | 31 | ||||
-rw-r--r-- | saharaclient/tests/functional/test_readonly_sahara.py | 113 | ||||
-rw-r--r-- | test-requirements.txt | 1 | ||||
-rw-r--r-- | tox.ini | 6 |
7 files changed, 4 insertions, 189 deletions
diff --git a/releasenotes/notes/remove-functional-tests-c4b9d43c2c32d121.yaml b/releasenotes/notes/remove-functional-tests-c4b9d43c2c32d121.yaml new file mode 100644 index 0000000..3475261 --- /dev/null +++ b/releasenotes/notes/remove-functional-tests-c4b9d43c2c32d121.yaml @@ -0,0 +1,4 @@ +--- +prelude: > + Functional tests were replaced to sahara-tests repository. Please refer to + README of sahara-tests about how to run these tests now. diff --git a/saharaclient/tests/functional/__init__.py b/saharaclient/tests/functional/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/saharaclient/tests/functional/__init__.py +++ /dev/null diff --git a/saharaclient/tests/functional/base.py b/saharaclient/tests/functional/base.py deleted file mode 100644 index b8ca3fa..0000000 --- a/saharaclient/tests/functional/base.py +++ /dev/null @@ -1,38 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -import os - -from tempest.lib.cli import base - - -class ClientTestBase(base.ClientTestBase): - """Base class for saharaclient tests. - - Establishes the sahara client and retrieves the essential environment - information. - """ - - def _get_clients(self): - cli_dir = os.environ.get( - 'OS_SAHARACLIENT_EXEC_DIR', - os.path.join(os.path.abspath('.'), '.tox/functional/bin')) - - return base.CLIClient( - username=os.environ.get('OS_USERNAME'), - password=os.environ.get('OS_PASSWORD'), - tenant_name=os.environ.get('OS_TENANT_NAME'), - uri=os.environ.get('OS_AUTH_URL'), - cli_dir=cli_dir) - - def openstack(self, *args, **kwargs): - return self.clients.openstack(*args, **kwargs) diff --git a/saharaclient/tests/functional/hooks/post_test_hook.sh b/saharaclient/tests/functional/hooks/post_test_hook.sh deleted file mode 100755 index 23b7f5e..0000000 --- a/saharaclient/tests/functional/hooks/post_test_hook.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -xe - -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# This script is executed inside post_test_hook function in devstack gate. - -export SAHARACLIENT_DIR="$BASE/new/python-saharaclient" - -# Get admin credentials -cd $BASE/new/devstack -source openrc admin admin - -# Go to the saharaclient dir -cd $SAHARACLIENT_DIR - -sudo chown -R jenkins:stack $SAHARACLIENT_DIR - -# Run tests -echo "Running saharaclient functional test suite" -# Preserve env for OS_ credentials -sudo -E -H -u jenkins /usr/local/jenkins/slave_scripts/run-tox.sh functional diff --git a/saharaclient/tests/functional/test_readonly_sahara.py b/saharaclient/tests/functional/test_readonly_sahara.py deleted file mode 100644 index 5d8bf61..0000000 --- a/saharaclient/tests/functional/test_readonly_sahara.py +++ /dev/null @@ -1,113 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -from saharaclient.tests.functional import base - - -class SimpleReadOnlySaharaClientTest(base.ClientTestBase): - """Basic, read-only tests for Sahara CLI client. - - Checks return values and output of read-only commands. - These tests do not presume any content, nor do they create - their own. They only verify the structure of output if present. - """ - - def test_openstack_cluster_list(self): - result = self.openstack('dataprocessing cluster list') - clusters = self.parser.listing(result) - self.assertTableStruct(clusters, [ - 'Name', - 'Id', - 'Plugin name', - 'Plugin version', - 'Status' - ]) - - def test_openstack_cluster_template_list(self): - result = self.openstack('dataprocessing cluster template list') - templates = self.parser.listing(result) - self.assertTableStruct(templates, [ - 'Name', - 'Id', - 'Plugin name', - 'Plugin version' - ]) - - def test_openstack_image_list(self): - result = self.openstack('dataprocessing image list') - images = self.parser.listing(result) - self.assertTableStruct(images, [ - 'Name', - 'Id', - 'Username', - 'Tags' - ]) - - def test_openstack_job_binary_list(self): - result = self.openstack('dataprocessing job binary list') - job_binary = self.parser.listing(result) - self.assertTableStruct(job_binary, [ - 'name', - 'url' - ]) - - def test_openstack_job_template_list(self): - result = self.openstack('dataprocessing job template list') - job_template = self.parser.listing(result) - self.assertTableStruct(job_template, [ - 'name', - 'type' - ]) - - def test_openstack_data_source_list(self): - result = self.openstack('dataprocessing data source list') - data_source = self.parser.listing(result) - self.assertTableStruct(data_source, [ - 'name', - 'type', - 'url' - ]) - - def test_openstack_job_type_list(self): - result = self.openstack('dataprocessing job type list') - job_type = self.parser.listing(result) - self.assertTableStruct(job_type, [ - 'Name', - 'Plugins' - ]) - - def test_openstack_node_group_template_list(self): - result = self.openstack('dataprocessing node group template list') - node_group = self.parser.listing(result) - self.assertTableStruct(node_group, [ - 'Name', - 'Id', - 'Plugin version', - 'Plugin name' - ]) - - def test_openstack_plugin_list(self): - result = self.openstack('dataprocessing plugin list') - plugin = self.parser.listing(result) - self.assertTableStruct(plugin, [ - 'Name', - 'Versions' - ]) - - def test_openstack_job_list(self): - result = self.openstack('dataprocessing job list') - jobs = self.parser.listing(result) - self.assertTableStruct(jobs, [ - 'id', - 'cluster_id', - 'status' - ]) diff --git a/test-requirements.txt b/test-requirements.txt index 6dc5a11..e690ab6 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -13,5 +13,4 @@ os-testr>=0.7.0 # Apache-2.0 reno>=1.8.0 # Apache2 requests-mock>=1.0 # Apache-2.0 sphinx!=1.3b1,<1.3,>=1.2.1 # BSD -tempest>=12.1.0 # Apache-2.0 testrepository>=0.0.18 # Apache-2.0/BSD @@ -28,12 +28,6 @@ commands = oslo_debug_helper -t saharaclient/tests/unit {posargs} basepython = python3.4 commands = oslo_debug_helper -t saharaclient/tests/unit {posargs} -[testenv:functional] -passenv = OS_* -setenv = - DISCOVER_DIRECTORY=saharaclient/tests/functional/ -commands = ostestr {posargs} - [testenv:cover] commands = python setup.py test --coverage --testr-args='{posargs}' |