Fix Minor Errors in Ranger-Tempest-Plugin
Some minor issues will be fixed in this patchset. Current included fixes: change ranger-tempest.sh script to use correct plugin path, changed var RANGER_PATH -> PLUGIN_PATH Include requirements.txt Change credential in client.py back to credentials Change-Id: I21cc4fdec861b7176134bf9031868c4aa41b35a9
This commit is contained in:
parent
e7c69f048c
commit
ad8e669f22
5
.stestr.conf
Normal file
5
.stestr.conf
Normal file
@ -0,0 +1,5 @@
|
||||
[DEFAULT]
|
||||
test_path=./ranger_tempest_plugin/tests/
|
||||
test_command=${PYTHON:-python} -m subunit.run discover ranger_tempest_plugin $LISTOPT $IDOPTION
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
42
.zuul.yaml
42
.zuul.yaml
@ -1,4 +1,42 @@
|
||||
- project:
|
||||
name: x/ranger-tempest-plugin
|
||||
templates:
|
||||
- openstack-python-jobs
|
||||
check:
|
||||
jobs:
|
||||
- ranger-tempest-sanity
|
||||
- ranger-tox-py27
|
||||
- ranger-tox-pep8
|
||||
- ranger-tox-pylint
|
||||
gate:
|
||||
jobs:
|
||||
- ranger-tempest-sanity
|
||||
- ranger-tox-py27
|
||||
- ranger-tox-pep8
|
||||
- ranger-tox-pylint
|
||||
- job:
|
||||
name: ranger-tempest-sanity
|
||||
parent: openstack-tox
|
||||
voting: true
|
||||
timeout: 1800
|
||||
vars:
|
||||
tox_envlist: 'tempest-sanity'
|
||||
- job:
|
||||
name: ranger-tox-py27
|
||||
parent: openstack-tox
|
||||
voting: true
|
||||
timeout: 900
|
||||
vars:
|
||||
tox_envlist: 'py27'
|
||||
- job:
|
||||
name: ranger-tox-pep8
|
||||
parent: openstack-tox
|
||||
voting: true
|
||||
timeout: 900
|
||||
vars:
|
||||
tox_envlist: 'pep8'
|
||||
- job:
|
||||
name: ranger-tox-pylint
|
||||
parent: openstack-tox
|
||||
voting: true
|
||||
timeout: 900
|
||||
vars:
|
||||
tox_envlist: 'pylint'
|
||||
|
@ -74,7 +74,6 @@ RUN mkdir -p /tempest/logs \
|
||||
&& rm -rf /tempest/.stestr.conf
|
||||
|
||||
# copy tempest test setup files
|
||||
COPY tempest_setup/.stestr.conf /tempest/
|
||||
COPY tempest_setup/create_tenant.sh /tempest/etc
|
||||
COPY tempest_setup/accounts.yaml /tempest/etc
|
||||
COPY tempest_setup/tempest.conf /tempest/etc
|
||||
@ -87,8 +86,8 @@ COPY tempest_setup/tempest.conf /tempest/etc
|
||||
### RUN tempest tests on test_regions
|
||||
##########################################################################
|
||||
### create egg-info for tempest
|
||||
WORKDIR /tempest/
|
||||
RUN python /tempest/setup.py develop
|
||||
|
||||
#ENTRYPOINT ostestr run ranger_tempest_plugin.tests.api.test_regions \
|
||||
# && /bin/bash
|
||||
#ENTRYPOINT ostestr run ranger_tempest_plugin.tests.api.test_flavors/ \
|
||||
|
@ -27,21 +27,25 @@ CONF = config.CONF
|
||||
|
||||
class OrmClientManager(clients.Manager):
|
||||
|
||||
def __init__(self, credential=None):
|
||||
super(OrmClientManager, self).__init__(credential)
|
||||
self.cms_client = CmsClient(base_client.RangerAuthProvider(credential),
|
||||
CONF.identity.catalog_type,
|
||||
CONF.identity.region,
|
||||
CONF.ranger.RANGER_CMS_BASE_URL)
|
||||
self.fms_client = FmsClient(base_client.RangerAuthProvider(credential),
|
||||
CONF.identity.catalog_type,
|
||||
CONF.identity.region,
|
||||
CONF.ranger.RANGER_FMS_BASE_URL)
|
||||
self.rms_client = RmsClient(base_client.RangerAuthProvider(credential),
|
||||
CONF.identity.catalog_type,
|
||||
CONF.identity.region,
|
||||
CONF.ranger.RANGER_RMS_BASE_URL)
|
||||
self.ims_client = ImsClient(base_client.RangerAuthProvider(credential),
|
||||
CONF.identity.catalog_type,
|
||||
CONF.identity.region,
|
||||
CONF.ranger.RANGER_IMS_BASE_URL)
|
||||
def __init__(self, credentials=None):
|
||||
super(OrmClientManager, self).__init__(credentials)
|
||||
self.cms_client = CmsClient(
|
||||
base_client.RangerAuthProvider(credentials),
|
||||
CONF.identity.catalog_type,
|
||||
CONF.identity.region,
|
||||
CONF.ranger.RANGER_CMS_BASE_URL)
|
||||
self.fms_client = FmsClient(
|
||||
base_client.RangerAuthProvider(credentials),
|
||||
CONF.identity.catalog_type,
|
||||
CONF.identity.region,
|
||||
CONF.ranger.RANGER_FMS_BASE_URL)
|
||||
self.rms_client = RmsClient(
|
||||
base_client.RangerAuthProvider(credentials),
|
||||
CONF.identity.catalog_type,
|
||||
CONF.identity.region,
|
||||
CONF.ranger.RANGER_RMS_BASE_URL)
|
||||
self.ims_client = ImsClient(
|
||||
base_client.RangerAuthProvider(credentials),
|
||||
CONF.identity.catalog_type,
|
||||
CONF.identity.region,
|
||||
CONF.ranger.RANGER_IMS_BASE_URL)
|
||||
|
@ -1,6 +0,0 @@
|
||||
###############################################################################################
|
||||
# Blacklist ORM Tests since the tests are having issues.
|
||||
# IST is looking into the same
|
||||
# This will be removed once IST resolves the same [no ETA has been provided]
|
||||
###############################################################################################
|
||||
(?:aic_orm_tempest_plugin.*)
|
19
requirements.txt
Normal file
19
requirements.txt
Normal file
@ -0,0 +1,19 @@
|
||||
# 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.
|
||||
|
||||
hacking>=0.12.0,<0.13 # Apache-2.0
|
||||
coverage>=4.0,!=4.4 # Apache-2.0
|
||||
oslo.config>=5.2.0 # Apache-2.0
|
||||
oslo.i18n>=3.15.3 # Apache-2.0
|
||||
oslo.log>=3.36.0 # Apache-2.0
|
||||
oslosphinx>=4.7.0 # Apache-2.0
|
||||
oslotest>=1.10.0 # Apache-2.0
|
||||
oslo.utils>=3.33.0 # Apache-2.0
|
||||
python-subunit>=0.0.18 # Apache-2.0/BSD
|
||||
reno>=1.8.0 # Apache-2.0
|
||||
requests>=2.10.0
|
||||
testfixtures>=5.1.1 # MIT
|
||||
stestr>=2.0.0
|
||||
tempest>=19.0.0
|
||||
testtools>=1.4.0 # MIT
|
2
setup.py
2
setup.py
@ -25,5 +25,5 @@ except ImportError:
|
||||
pass
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['pbr>=2.0.0'],
|
||||
setup_requires=['pbr>=2.10.0'],
|
||||
pbr=True)
|
||||
|
@ -1,6 +0,0 @@
|
||||
[DEFAULT]
|
||||
test_path=../ranger/ranger-tempest-plugin/ranger_tempest_plugin/tests/
|
||||
top_dir=../ranger/ranger-tempest-plugin/
|
||||
test_command=${PYTHON:-python} -m subunit.run discover orm $LISTOPT $IDOPTION
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
@ -19,21 +19,21 @@ function execute_tests {
|
||||
stestr init
|
||||
fi
|
||||
|
||||
# sets RANGER_DIRECTORY to relevant subdirectory and copies files for tests
|
||||
RANGER_DIRECTORY=${RANGER_DIRECTORY}/ranger-tempest-plugin/tempest_setup
|
||||
# sets PLUGIN_DIRECTORY to relevant subdirectory and copies files for tests
|
||||
PLUGIN_DIRECTORY=${PLUGIN_DIRECTORY}/tempest_setup
|
||||
|
||||
# check for necessary files, copy them from ranger if not found
|
||||
if [[ ! -e ./.stestr.conf ]]; then
|
||||
cp ${RANGER_DIRECTORY}/.stestr.conf ./
|
||||
cp ${PLUGIN_DIRECTORY}/.stestr.conf ./
|
||||
fi
|
||||
if [[ ! -e etc/tempest.conf ]]; then
|
||||
cp ${RANGER_DIRECTORY}/tempest.conf etc/
|
||||
cp ${PLUGIN_DIRECTORY}/tempest.conf etc/
|
||||
fi
|
||||
if [[ ! -e etc/create_tenant.sh ]]; then
|
||||
cp ${RANGER_DIRECTORY}/create_tenant.sh etc/
|
||||
cp ${PLUGIN_DIRECTORY}/create_tenant.sh etc/
|
||||
fi
|
||||
if [[ ! -e etc/accounts.yaml ]]; then
|
||||
cp ${RANGER_DIRECTORY}/accounts.yaml etc/
|
||||
cp ${PLUGIN_DIRECTORY}/accounts.yaml etc/
|
||||
fi
|
||||
|
||||
# runs tests using stestr and regex, ex: ranger_tempest_plugin.tests.api.test_regions
|
||||
@ -43,7 +43,7 @@ function execute_tests {
|
||||
usage()
|
||||
{
|
||||
cat << EOF
|
||||
usage: ./ranger-tempest.sh -t TEMPEST_DIRECTORY -c CONCURRENCY -r RANGER_DIRECTORY -f TEST_REGEX
|
||||
usage: ./ranger-tempest.sh -t TEMPEST_DIRECTORY -c CONCURRENCY -r PLUGIN_DIRECTORY -f TEST_REGEX
|
||||
|
||||
This script automates a few steps necessary to run Tempest against Ranger
|
||||
|
||||
@ -52,14 +52,14 @@ OPTIONS:
|
||||
-t The Tempest Folder fully-formed path
|
||||
-c Concurrency
|
||||
-r The location of your Ranger folder
|
||||
-f The regex representing the tests that will be ran
|
||||
-f The regex representing the tests that will be ran if you do not wish to run all tests
|
||||
EOF
|
||||
}
|
||||
|
||||
TEMPEST_DIRECTORY=
|
||||
CONCURRENCY=1
|
||||
TEST_REGEX=
|
||||
RANGER_DIRECTORY=
|
||||
PLUGIN_DIRECTORY=
|
||||
while getopts "ht:c:f:r:" OPTION
|
||||
do
|
||||
case $OPTION in
|
||||
@ -77,7 +77,7 @@ do
|
||||
TEST_REGEX=$OPTARG
|
||||
;;
|
||||
r)
|
||||
RANGER_DIRECTORY=$OPTARG
|
||||
PLUGIN_DIRECTORY=$OPTARG
|
||||
;;
|
||||
?)
|
||||
usage
|
||||
@ -94,8 +94,8 @@ if [[ -z $TEMPEST_DIRECTORY ]]; then
|
||||
# echo "The script expects a regex of tests to run"
|
||||
# usage
|
||||
# exit 1
|
||||
elif [[ -z $RANGER_DIRECTORY ]]; then
|
||||
echo "This script requires the location of the Ranger folder"
|
||||
elif [[ -z $PLUGIN_DIRECTORY ]]; then
|
||||
echo "This script requires the location of the ranger-tempest-plugin folder"
|
||||
usage
|
||||
exit 1
|
||||
else
|
||||
|
@ -1,7 +1,7 @@
|
||||
[DEFAULT]
|
||||
debug = true
|
||||
log_file = tempest.log
|
||||
log_dir = /var/log/tempest
|
||||
log_dir =
|
||||
|
||||
[auth]
|
||||
test_accounts_file = /opt/stack/tempest/etc/accounts.yaml
|
||||
|
14
tox.ini
14
tox.ini
@ -1,6 +1,6 @@
|
||||
[tox]
|
||||
minversion = 1.6
|
||||
envlist = py27,pep8,pylint
|
||||
minversion = 3.4
|
||||
envlist = py27,pep8,pylint,tempest-sanity
|
||||
skipdist = True
|
||||
|
||||
|
||||
@ -69,3 +69,13 @@ commands =
|
||||
whitelist_externals =
|
||||
bash
|
||||
|
||||
# Ranger Tempest sanity check
|
||||
[testenv:tempest-sanity]
|
||||
description = tempest run -l as sanity check
|
||||
sitepackages = True
|
||||
basepython = python
|
||||
deps = -r requirements.txt
|
||||
commands =
|
||||
touch tempest.log
|
||||
stestr init
|
||||
tempest run -l --config-file tempest_setup/tempest.conf --log-file tempest.log
|
||||
|
Loading…
Reference in New Issue
Block a user