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
set -e
export OS_TEST_PATH='tests.functional'
export OS_TEST_PATH='test.functional'
export PYTHON='coverage run --source swiftclient --parallel-mode'
stestr run --concurrency=1

View File

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

View File

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

View File

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

View File

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