Skip to content

Commit 0833bca

Browse files
author
Katarzyna Treder
committed
Move tests data path to TF
Signed-off-by: Katarzyna Treder <[email protected]>
1 parent c4b862a commit 0833bca

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

test/functional/tests/conftest.py

+5-9
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@
3737
from storage_devices.drbd import Drbd
3838

3939

40-
TEST_RUN_DATA_PATH = "/tmp/open_cas_test_data"
41-
42-
4340
def pytest_addoption(parser):
4441
TestRun.addoption(parser)
4542
parser.addoption("--dut-config", action="append", type=str)
@@ -136,7 +133,6 @@ def pytest_runtest_setup(item):
136133
TestRun.LOGGER.info(f"DUT info: {TestRun.dut}")
137134
TestRun.dut.plugin_manager = TestRun.plugin_manager
138135
TestRun.dut.executor = TestRun.executor
139-
TestRun.TEST_RUN_DATA_PATH = TEST_RUN_DATA_PATH
140136
TestRun.dut.cache_list = []
141137
TestRun.dut.core_list = []
142138
TestRun.duts.append(TestRun.dut)
@@ -192,14 +188,14 @@ def base_prepare(item):
192188

193189
RamDisk.remove_all()
194190

195-
if check_if_directory_exists(path=TEST_RUN_DATA_PATH):
191+
if check_if_directory_exists(path=TestRun.TEST_RUN_DATA_PATH):
196192
remove(
197-
path=posixpath.join(TEST_RUN_DATA_PATH, "*"),
193+
path=posixpath.join(TestRun.TEST_RUN_DATA_PATH, "*"),
198194
force=True,
199195
recursive=True,
200196
)
201197
else:
202-
create_directory(path=TEST_RUN_DATA_PATH)
198+
create_directory(path=TestRun.TEST_RUN_DATA_PATH)
203199

204200
for disk in TestRun.disks.values():
205201
disk_serial = Disk.get_disk_serial_number(disk.path)
@@ -268,9 +264,9 @@ def pytest_runtest_teardown():
268264
DeviceMapper.remove_all()
269265
RamDisk.remove_all()
270266

271-
if check_if_directory_exists(path=TEST_RUN_DATA_PATH):
267+
if check_if_directory_exists(path=TestRun.TEST_RUN_DATA_PATH):
272268
remove(
273-
path=posixpath.join(TEST_RUN_DATA_PATH, "*"),
269+
path=posixpath.join(TestRun.TEST_RUN_DATA_PATH, "*"),
274270
force=True,
275271
recursive=True,
276272
)

0 commit comments

Comments
 (0)