From c4172d652da9823eabaec3ebb4f9624baa8ac763 Mon Sep 17 00:00:00 2001 From: Ruslan Kamaldinov Date: Fri, 8 May 2015 22:14:04 +0300 Subject: [PATCH] Update from global-requirements.txt and fix cli tests Commit ID from openstack/requirements: 40b86ac9cb707ff97f5b140d4f5fe5f1dcbbb2ed There are a few changes in how CLI client is setup in functional tests after tempest-lib updated to 0.5. A temporary workaround is introduced to overcome lack of current configuration of CLI client tests. Next step - move CLI tests to python-muranoclient since this is a common direction in community. Change-Id: I059be13fc0af4a0faec917322b4f82d0f4a81117 --- functionaltests/run_tests_common.sh | 9 ++++++++ murano/tests/functional/cli/muranoclient.py | 23 ++++++++++----------- requirements.txt | 6 +++--- test-requirements.txt | 3 ++- 4 files changed, 25 insertions(+), 16 deletions(-) diff --git a/functionaltests/run_tests_common.sh b/functionaltests/run_tests_common.sh index 1e9410e41..10b8ffbd8 100755 --- a/functionaltests/run_tests_common.sh +++ b/functionaltests/run_tests_common.sh @@ -20,3 +20,12 @@ export PYTHONPATH=$PYTHONPATH:$TEMPEST_DIR #installing requirements for tempest pip install -r $TEMPEST_DIR/requirements.txt + +#installing test requirements for murano +pip install -r ../test-requirements.txt + +# Get admin credentials +cwd=$(pwd) +cd /opt/stack/new/devstack +source openrc admin admin +cd $cwd diff --git a/murano/tests/functional/cli/muranoclient.py b/murano/tests/functional/cli/muranoclient.py index 04ba4bf05..2001667f8 100644 --- a/murano/tests/functional/cli/muranoclient.py +++ b/murano/tests/functional/cli/muranoclient.py @@ -12,27 +12,26 @@ # License for the specific language governing permissions and limitations # under the License. -from tempest_lib.cli import base # noqa +import os -from tempest import config - -CONF = config.CONF +from tempest_lib.cli import base class ClientTestBase(base.ClientTestBase): - def murano(self, action, flags='', params='', admin=True, fail_ok=False): - """Executes murano command for the given action.""" + def murano(self, action, flags='', params='', + fail_ok=False, endpoint_type='publicURL', merge_stderr=True): return self.clients.cmd_with_auth( - 'murano', action, flags, params, admin, fail_ok) + 'murano', action, flags, params, fail_ok, merge_stderr) def _get_clients(self): clients = base.CLIClient( - CONF.identity.admin_username, - CONF.identity.admin_password, - CONF.identity.admin_tenant_name, - CONF.identity.uri, - CONF.cli.cli_dir + 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'), + # FIXME: see how it's done in saharaclient + cli_dir='/usr/local/bin' ) return clients diff --git a/requirements.txt b/requirements.txt index 1698ae057..29f7cc97e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1,10 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -pbr>=0.6,!=0.7,<1.0 +pbr>=0.11,<2.0 Babel>=1.3 SQLAlchemy>=0.9.7,<=0.9.99 -stevedore>=1.3.0 +stevedore>=1.3.0 # Apache-2.0 alembic>=0.7.2 eventlet>=0.17.3 PasteDeploy>=1.5.0 @@ -23,7 +23,7 @@ keystonemiddleware>=1.5.0 Paste jsonschema>=2.0.0,<3.0.0 -python-keystoneclient>=1.1.0 +python-keystoneclient>=1.3.0 python-heatclient>=0.3.0 python-neutronclient>=2.3.11,<3 oslo.db>=1.7.0 # Apache-2.0 diff --git a/test-requirements.txt b/test-requirements.txt index e49010eab..a36902b41 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,10 +7,11 @@ coverage>=3.6 discover fixtures>=0.3.14 mock>=1.0 +nose oslotest>=1.5.1 # Apache-2.0 posix_ipc sqlalchemy-migrate>=0.9.5 -tempest-lib>=0.4.0 +tempest-lib>=0.5.0 testrepository>=0.0.18 testresources>=0.2.4 testscenarios>=0.4