Skip to content

Commit 22fe1e6

Browse files
committed
Rename old test files by adding old suffix
Rename test files testing the old code by adding an "old" suffix. This is done, so we can easily exclude them from linting. Signed-off-by: Martin Vrachev <[email protected]>
1 parent 5aa547d commit 22fe1e6

33 files changed

+53
-53
lines changed

docs/CONTRIBUTORS.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ Individual tests can also be executed. Optional '-v' flags can be added to
139139
increase log level up to DEBUG ('-vvvv').
140140
::
141141

142-
$ python3 test_updater.py # run a specific test file
143-
$ python3 test_updater.py TestUpdater.test_4_refresh # run a specific test
144-
$ python3 test_updater.py -vvvv TestUpdater.test_4_refresh # run test with DEBUG log level
142+
$ python3 test_updater_ng.py # run a specific test file
143+
$ python3 test_updater_ng.py TestUpdater.test_refresh_and_download # run a specific test
144+
$ python3 test_updater_ng.py -vvvv TestUpdater.test_refresh_and_download # run test with DEBUG log level
145145

146146

147147
All of the log levels and the corresponding options that could be used for testing are:
File renamed without changes.

tests/repository_data/generate_project_data.py renamed to tests/repository_data/generate_project_data_old.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
See LICENSE-MIT.txt OR LICENSE-APACHE.txt for licensing information.
1818
1919
<Purpose>
20-
Generate a pre-fabricated set of metadata files for 'test_developer_tool.py'
21-
test cases.
20+
Generate a pre-fabricated set of metadata files for
21+
'test_developer_tool_old.py' test cases.
2222
"""
2323

2424
import shutil

tests/simple_https_server.py renamed to tests/simple_https_server_old.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
"""
77
<Program>
8-
simple_https_server.py
8+
simple_https_server_old.py
99
1010
<Author>
1111
Vladimir Diaz.
@@ -53,7 +53,7 @@
5353
print(port_message)
5454

5555
if len(sys.argv) > 1 and certfile != sys.argv[1]:
56-
print('simple_https_server: cert file was not found: ' + sys.argv[1] +
56+
print('simple_https_server_old: cert file was not found: ' + sys.argv[1] +
5757
'; using default: ' + certfile + " certfile")
5858

5959
httpd.serve_forever()

tests/slow_retrieval_server.py renamed to tests/slow_retrieval_server_old.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
"""
77
<Program Name>
8-
slow_retrieval_server.py
8+
slow_retrieval_server_old.py
99
1010
<Author>
1111
Konstantin Andrianov.
@@ -18,7 +18,7 @@
1818
1919
<Purpose>
2020
Server that throttles data by sending one byte at a time (specified time
21-
interval 'DELAY'). The server is used in 'test_slow_retrieval_attack.py'.
21+
interval 'DELAY'). The server is used in 'test_slow_retrieval_attack_old.py'.
2222
"""
2323

2424
import os

tests/test_arbitrary_package_attack.py renamed to tests/test_arbitrary_package_attack_old.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
"""
77
<Program Name>
8-
test_arbitrary_package_attack.py
8+
test_arbitrary_package_attack_old.py
99
1010
<Author>
1111
Konstantin Andrianov.

tests/test_developer_tool.py renamed to tests/test_developer_tool_old.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
"""
77
<Program Name>
8-
test_developer_tool.py.
8+
test_developer_tool_old.py.
99
1010
<Authors>
1111
Santiago Torres Arias <[email protected]>

tests/test_download.py renamed to tests/test_download_old.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
"""
77
<Program>
8-
test_download.py
8+
test_download_old.py
99
1010
<Author>
1111
Konstantin Andrianov.
@@ -19,7 +19,7 @@
1919
<Purpose>
2020
Unit test for 'download.py'.
2121
22-
NOTE: Make sure test_download.py is ran in 'tuf/tests/' directory.
22+
NOTE: Make sure test_download_old.py is ran in 'tuf/tests/' directory.
2323
Otherwise, module that launches simple server would not be found.
2424
2525
TODO: Adopt the environment variable management from test_proxy_use.py here.
@@ -274,16 +274,16 @@ def test_https_connection(self):
274274

275275

276276
good_https_server_handler = utils.TestServerProcess(log=logger,
277-
server='simple_https_server.py',
277+
server='simple_https_server_old.py',
278278
extra_cmd_args=[good_cert_fname])
279279
good2_https_server_handler = utils.TestServerProcess(log=logger,
280-
server='simple_https_server.py',
280+
server='simple_https_server_old.py',
281281
extra_cmd_args=[good2_cert_fname])
282282
bad_https_server_handler = utils.TestServerProcess(log=logger,
283-
server='simple_https_server.py',
283+
server='simple_https_server_old.py',
284284
extra_cmd_args=[bad_cert_fname])
285285
expd_https_server_handler = utils.TestServerProcess(log=logger,
286-
server='simple_https_server.py',
286+
server='simple_https_server_old.py',
287287
extra_cmd_args=[expired_cert_fname])
288288

289289
suffix = '/' + os.path.basename(target_filepath)

tests/test_endless_data_attack.py renamed to tests/test_endless_data_attack_old.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
"""
77
<Program Name>
8-
test_endless_data_attack.py
8+
test_endless_data_attack_old.py
99
1010
<Author>
1111
Konstantin Andrianov.

0 commit comments

Comments
 (0)