Merge "Parametrize target_dir for the timestamp"
This commit is contained in:
commit
b1a9ea85ae
@ -0,0 +1,7 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Adding a new config options `[scenario]/target_dir` which allows
|
||||
users to specify the location where timestamps files will be
|
||||
written to. The default value is /tmp that, however, cannot be
|
||||
expected to persist across reboots of an instance.
|
@ -1217,7 +1217,10 @@ ScenarioGroup = [
|
||||
default='icmp',
|
||||
choices=('icmp', 'tcp', 'udp'),
|
||||
help='The protocol used in security groups tests to check '
|
||||
'connectivity.')
|
||||
'connectivity.'),
|
||||
cfg.StrOpt('target_dir',
|
||||
default='/tmp',
|
||||
help='Directory in which to write the timestamp file.'),
|
||||
]
|
||||
|
||||
|
||||
|
@ -1238,7 +1238,7 @@ class ScenarioTest(tempest.test.BaseTestCase):
|
||||
# Default the directory in which to write the timestamp file to /tmp
|
||||
# and only use the mount_path as the target directory if we mounted
|
||||
# dev_name to mount_path.
|
||||
target_dir = '/tmp'
|
||||
target_dir = CONF.scenario.target_dir
|
||||
if dev_name is not None:
|
||||
mount_path = os.path.join(mount_path, dev_name)
|
||||
ssh_client.make_fs(dev_name, fs=fs)
|
||||
@ -1277,7 +1277,7 @@ class ScenarioTest(tempest.test.BaseTestCase):
|
||||
# Default the directory from which to read the timestamp file to /tmp
|
||||
# and only use the mount_path as the target directory if we mounted
|
||||
# dev_name to mount_path.
|
||||
target_dir = '/tmp'
|
||||
target_dir = CONF.scenario.target_dir
|
||||
if dev_name is not None:
|
||||
mount_path = os.path.join(mount_path, dev_name)
|
||||
ssh_client.mkdir(mount_path)
|
||||
|
Loading…
Reference in New Issue
Block a user