Merge "tempest plugin: save package in temporary dir"
This commit is contained in:
commit
a5dd498d07
|
@ -52,7 +52,9 @@
|
|||
TEMPEST_PLUGINS: '/opt/stack/qinling'
|
||||
tox_envlist: all-plugin
|
||||
tempest_test_regex: '^(qinling_tempest_plugin.)'
|
||||
tempest_concurrency: 1
|
||||
# Set tempest concurrency to qinling's default number of replicas in a
|
||||
# deployment to avoid tests failing of no avaliable pod.
|
||||
tempest_concurrency: 3
|
||||
|
||||
- project:
|
||||
check:
|
||||
|
|
|
@ -102,7 +102,8 @@ class BaseQinlingTest(test.BaseTestCase):
|
|||
)
|
||||
base_name, extention = os.path.splitext(file_path)
|
||||
module_name = os.path.basename(base_name)
|
||||
zip_file = os.path.join(tempfile.gettempdir(), '%s.zip' % module_name)
|
||||
temp_dir = tempfile.mkdtemp()
|
||||
zip_file = os.path.join(temp_dir, '%s.zip' % module_name)
|
||||
|
||||
if not os.path.isfile(zip_file):
|
||||
zf = zipfile.ZipFile(zip_file, mode='w')
|
||||
|
@ -111,6 +112,7 @@ class BaseQinlingTest(test.BaseTestCase):
|
|||
finally:
|
||||
zf.close()
|
||||
|
||||
self.addCleanup(os.rmdir, temp_dir)
|
||||
self.addCleanup(os.remove, zip_file)
|
||||
return zip_file
|
||||
|
||||
|
|
Loading…
Reference in New Issue