Switch to using stestr

When the TC merged I2637dd714cbb6d38ef8b8dc1083e359207118284 we're
supposed to invoke stestr rather than testr so lets do that

Change-Id: I54513b9ce607defa502d00b526fa7bac79553b5e
This commit is contained in:
Brad P. Crochet 2018-05-21 18:22:50 -04:00 committed by Dougal Matthews
parent 7bff2ef011
commit b62fe64b2a
8 changed files with 15 additions and 2 deletions

2
.gitignore vendored
View File

@ -28,6 +28,8 @@ pip-log.txt
cover/*
.tox
nosetests.xml
.stestr/
.testrepository/
functional_creds.conf
AUTHORS
ChangeLog

3
.stestr.conf Normal file
View File

@ -0,0 +1,3 @@
[DEFAULT]
test_path=./mistralclient/tests/unit
top_dir=./

View File

@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import os.path
import pkg_resources as pkg
from six.moves.urllib import parse
from six.moves.urllib import request
@ -133,6 +134,7 @@ class TestActionsV2(base.BaseClientV2Test):
'mistralclient',
'tests/unit/resources/action_v2.yaml'
)
path = os.path.abspath(path)
# Convert the file path to file URI
uri = parse.urljoin('file:', request.pathname2url(path))

View File

@ -14,6 +14,7 @@
import collections
import copy
import json
import os.path
import pkg_resources as pkg
from six.moves.urllib import parse
@ -61,6 +62,7 @@ class TestEnvironmentsV2(base.BaseClientV2Test):
'mistralclient',
'tests/unit/resources/env_v2.json'
)
path = os.path.abspath(path)
# Convert the file path to file URI
uri = parse.urljoin('file:', request.pathname2url(path))

View File

@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import os.path
import pkg_resources as pkg
from six.moves.urllib import parse
from six.moves.urllib import request
@ -94,6 +95,7 @@ class TestWorkbooksV2(base.BaseClientV2Test):
'mistralclient',
'tests/unit/resources/wb_v2.yaml'
)
path = os.path.abspath(path)
# Convert the file path to file URI
uri = parse.urljoin('file:', request.pathname2url(path))

View File

@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import os.path
import pkg_resources as pkg
from six.moves.urllib import parse
from six.moves.urllib import request
@ -119,6 +120,7 @@ class TestWorkflowsV2(base.BaseClientV2Test):
'mistralclient',
'tests/unit/resources/wf_v2.yaml'
)
path = os.path.abspath(path)
# Convert the file path to file URI
uri = parse.urljoin('file:', request.pathname2url(path))

View File

@ -5,10 +5,10 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
python-openstackclient>=3.12.0 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
mock>=2.0.0 # BSD
nose>=1.3.7 # LGPL
oslotest>=3.2.0 # Apache-2.0
requests-mock>=1.2.0 # Apache-2.0
tempest>=17.1.0 # Apache-2.0
osprofiler>=1.4.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0
openstackdocstheme>=1.18.1 # Apache-2.0

View File

@ -23,7 +23,7 @@ deps =
-r{toxinidir}/test-requirements.txt
commands =
find . -type f -name "*.pyc" -delete
nosetests mistralclient/tests/unit
stestr run --concurrency 1 {posargs}
whitelist_externals = find
rm
[testenv:functional]