Rename "tests" directory to be "test" like in the swift repo

In addition to being less confusing for devs, this lets us actually run
tempauth tests in swiftclient dsvm jobs.

The job definition (over in the swift repo) specifies test/sample.conf,
which does not exist in this repo. As a result, those tests would skip
with

    SKIPPING FUNCTIONAL TESTS DUE TO NO CONFIG

Change-Id: I558dbf9a657d442e6e19468e543bbec855129eeb
This commit is contained in:
Tim Burke
2019-10-09 21:05:47 -07:00
parent 9527d0497f
commit 1eda8f9f3e
17 changed files with 9 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
set -e set -e
export OS_TEST_PATH='tests.functional' export OS_TEST_PATH='test.functional'
export PYTHON='coverage run --source swiftclient --parallel-mode' export PYTHON='coverage run --source swiftclient --parallel-mode'
stestr run --concurrency=1 stestr run --concurrency=1

View File

@@ -1,4 +1,4 @@
[DEFAULT] [DEFAULT]
test_path=${OS_TEST_PATH:-./tests/unit} test_path=${OS_TEST_PATH:-./test/unit}
top_dir=./ top_dir=./

View File

@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
set -e set -e
python setup.py testr --coverage --testr-args="tests.unit" python setup.py testr --coverage --testr-args="test.unit"
RET=$? RET=$?
coverage report -m coverage report -m
rm -f .coverage rm -f .coverage

View File

@@ -36,7 +36,7 @@ from swiftclient.service import (
SwiftService, SwiftError, SwiftUploadObject SwiftService, SwiftError, SwiftUploadObject
) )
from tests.unit import utils as test_utils from test.unit import utils as test_utils
clean_os_environ = {} clean_os_environ = {}
@@ -1060,11 +1060,11 @@ class TestService(unittest.TestCase):
@mock.patch('swiftclient.service.getsize', return_value=4) @mock.patch('swiftclient.service.getsize', return_value=4)
def test_upload_with_relative_path(self, *args, **kwargs): def test_upload_with_relative_path(self, *args, **kwargs):
service = SwiftService({}) service = SwiftService({})
objects = [{'path': "./test", objects = [{'path': "./testobj",
'strt_indx': 2}, 'strt_indx': 2},
{'path': os.path.join(os.getcwd(), "test"), {'path': os.path.join(os.getcwd(), "testobj"),
'strt_indx': 1}, 'strt_indx': 1},
{'path': ".\\test", {'path': ".\\testobj",
'strt_indx': 2}] 'strt_indx': 2}]
for obj in objects: for obj in objects:
with mock.patch('swiftclient.service.Connection') as mock_conn, \ with mock.patch('swiftclient.service.Connection') as mock_conn, \

View File

@@ -24,7 +24,7 @@ passenv = SWIFT_* *_proxy
[testenv:pep8] [testenv:pep8]
basepython = python3 basepython = python3
commands = commands =
python -m flake8 swiftclient tests python -m flake8 swiftclient test
[testenv:venv] [testenv:venv]
basepython = python3 basepython = python3
@@ -44,7 +44,7 @@ commands =
[testenv:func] [testenv:func]
basepython = python3 basepython = python3
setenv = setenv =
OS_TEST_PATH=tests.functional OS_TEST_PATH=test.functional
PYTHON=coverage run --source swiftclient --parallel-mode PYTHON=coverage run --source swiftclient --parallel-mode
whitelist_externals = whitelist_externals =
coverage coverage