Skip to content

Commit 9db013a

Browse files
author
Jussi Kukkonen
committed
test_repository_tool: Add missing clear_all flag
Currently TestTimestamp creates custom databases but only clears the default ones. This means next create_*db() call will fail meaning every test after this one will fail (currently TestTimestamp happens to be last but the effect can be seen by renaming it to TestATimestamp). Also remove the clear_*db() calls from TestRepository::Setup(): they are likely to be a workaround for a similar problem earlier (earlier test failed to cleanup). Signed-off-by: Jussi Kukkonen <[email protected]>
1 parent de8649e commit 9db013a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/test_repository_tool.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@ def tearDownClass(cls):
8181

8282

8383
def setUp(self):
84-
tuf.roledb.clear_roledb(clear_all=True)
85-
tuf.keydb.clear_keydb(clear_all=True)
86-
8784
tuf.roledb.create_roledb('test_repository')
8885
tuf.keydb.create_keydb('test_repository')
8986

@@ -1110,8 +1107,8 @@ def setUp(self):
11101107

11111108

11121109
def tearDown(self):
1113-
tuf.roledb.clear_roledb()
1114-
tuf.keydb.clear_keydb()
1110+
tuf.roledb.clear_roledb(clear_all=True)
1111+
tuf.keydb.clear_keydb(clear_all=True)
11151112

11161113

11171114

0 commit comments

Comments
 (0)