summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Burke <tim.burke@gmail.com>2019-10-09 21:05:47 -0700
committerTim Burke <tim.burke@gmail.com>2019-11-06 03:48:02 +0000
commit1eda8f9f3eac55953b3d54e32754e2ec312ab348 (patch)
treea60d70e87ff3bf280464e4c6808648ac35d43160
parent9527d0497f19487114e158de6387fb5483cf3182 (diff)
downloadpython-swiftclient-1eda8f9f3eac55953b3d54e32754e2ec312ab348.tar.gz
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
-rwxr-xr-x.functests2
-rw-r--r--.stestr.conf2
-rwxr-xr-x.unittests2
-rw-r--r--test/__init__.py (renamed from tests/__init__.py)0
-rw-r--r--test/functional/__init__.py (renamed from tests/functional/__init__.py)0
-rw-r--r--test/functional/test_swiftclient.py (renamed from tests/functional/test_swiftclient.py)0
-rw-r--r--test/sample.conf (renamed from tests/sample.conf)0
-rw-r--r--test/unit/__init__.py (renamed from tests/unit/__init__.py)0
-rw-r--r--test/unit/test_authv1.py (renamed from tests/unit/test_authv1.py)0
-rw-r--r--test/unit/test_command_helpers.py (renamed from tests/unit/test_command_helpers.py)0
-rw-r--r--test/unit/test_multithreading.py (renamed from tests/unit/test_multithreading.py)0
-rw-r--r--test/unit/test_service.py (renamed from tests/unit/test_service.py)8
-rw-r--r--test/unit/test_shell.py (renamed from tests/unit/test_shell.py)0
-rw-r--r--test/unit/test_swiftclient.py (renamed from tests/unit/test_swiftclient.py)0
-rw-r--r--test/unit/test_utils.py (renamed from tests/unit/test_utils.py)0
-rw-r--r--test/unit/utils.py (renamed from tests/unit/utils.py)0
-rw-r--r--tox.ini4
17 files changed, 9 insertions, 9 deletions
diff --git a/.functests b/.functests
index d199ec8..288c9e6 100755
--- a/.functests
+++ b/.functests
@@ -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
diff --git a/.stestr.conf b/.stestr.conf
index 5228f20..90f5b81 100644
--- a/.stestr.conf
+++ b/.stestr.conf
@@ -1,4 +1,4 @@
[DEFAULT]
-test_path=${OS_TEST_PATH:-./tests/unit}
+test_path=${OS_TEST_PATH:-./test/unit}
top_dir=./
diff --git a/.unittests b/.unittests
index 5d935b1..3a7ffe9 100755
--- a/.unittests
+++ b/.unittests
@@ -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
diff --git a/tests/__init__.py b/test/__init__.py
index e69de29..e69de29 100644
--- a/tests/__init__.py
+++ b/test/__init__.py
diff --git a/tests/functional/__init__.py b/test/functional/__init__.py
index e69de29..e69de29 100644
--- a/tests/functional/__init__.py
+++ b/test/functional/__init__.py
diff --git a/tests/functional/test_swiftclient.py b/test/functional/test_swiftclient.py
index 9a74c63..9a74c63 100644
--- a/tests/functional/test_swiftclient.py
+++ b/test/functional/test_swiftclient.py
diff --git a/tests/sample.conf b/test/sample.conf
index 95c1a47..95c1a47 100644
--- a/tests/sample.conf
+++ b/test/sample.conf
diff --git a/tests/unit/__init__.py b/test/unit/__init__.py
index e69de29..e69de29 100644
--- a/tests/unit/__init__.py
+++ b/test/unit/__init__.py
diff --git a/tests/unit/test_authv1.py b/test/unit/test_authv1.py
index 2ddf24b..2ddf24b 100644
--- a/tests/unit/test_authv1.py
+++ b/test/unit/test_authv1.py
diff --git a/tests/unit/test_command_helpers.py b/test/unit/test_command_helpers.py
index 24684ae..24684ae 100644
--- a/tests/unit/test_command_helpers.py
+++ b/test/unit/test_command_helpers.py
diff --git a/tests/unit/test_multithreading.py b/test/unit/test_multithreading.py
index 8944d48..8944d48 100644
--- a/tests/unit/test_multithreading.py
+++ b/test/unit/test_multithreading.py
diff --git a/tests/unit/test_service.py b/test/unit/test_service.py
index b760352..ed3a2d6 100644
--- a/tests/unit/test_service.py
+++ b/test/unit/test_service.py
@@ -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, \
diff --git a/tests/unit/test_shell.py b/test/unit/test_shell.py
index c972281..c972281 100644
--- a/tests/unit/test_shell.py
+++ b/test/unit/test_shell.py
diff --git a/tests/unit/test_swiftclient.py b/test/unit/test_swiftclient.py
index 2d45deb..2d45deb 100644
--- a/tests/unit/test_swiftclient.py
+++ b/test/unit/test_swiftclient.py
diff --git a/tests/unit/test_utils.py b/test/unit/test_utils.py
index 97abc44..97abc44 100644
--- a/tests/unit/test_utils.py
+++ b/test/unit/test_utils.py
diff --git a/tests/unit/utils.py b/test/unit/utils.py
index 025a234..025a234 100644
--- a/tests/unit/utils.py
+++ b/test/unit/utils.py
diff --git a/tox.ini b/tox.ini
index 7dd864b..002d24c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -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