Trivial: don't create unused temporary directory
Functional tests create unused temp directory, drop it. Change-Id: I97cfe5def1229491bbb09ca14db29c0574bb1c15
This commit is contained in:
parent
bea75077d2
commit
aa2bd671d4
@ -19,7 +19,6 @@ import copy
|
|||||||
import datetime
|
import datetime
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import shutil
|
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
import unittest
|
import unittest
|
||||||
@ -789,8 +788,6 @@ class Test(Base):
|
|||||||
|
|
||||||
@contextlib.contextmanager
|
@contextlib.contextmanager
|
||||||
def mocked_server():
|
def mocked_server():
|
||||||
d = tempfile.mkdtemp()
|
|
||||||
try:
|
|
||||||
conf_file = get_test_conf_file()
|
conf_file = get_test_conf_file()
|
||||||
with mock.patch.object(ir_utils, 'get_client'):
|
with mock.patch.object(ir_utils, 'get_client'):
|
||||||
dbsync.main(args=['--config-file', conf_file, 'upgrade'])
|
dbsync.main(args=['--config-file', conf_file, 'upgrade'])
|
||||||
@ -816,8 +813,6 @@ def mocked_server():
|
|||||||
yield
|
yield
|
||||||
# Make sure all processes finished executing
|
# Make sure all processes finished executing
|
||||||
eventlet.greenthread.sleep(1)
|
eventlet.greenthread.sleep(1)
|
||||||
finally:
|
|
||||||
shutil.rmtree(d)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user