Fix imports
Signed-off-by: Katarzyna Treder <katarzyna.treder@h-partners.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#
|
||||
# Copyright(c) 2019-2021 Intel Corporation
|
||||
# Copyright(c) 2024 Huawei Technologies Co., Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#
|
||||
# Copyright(c) 2019-2021 Intel Corporation
|
||||
# Copyright(c) 2024 Huawei Technologies Co., Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
@@ -12,12 +13,10 @@ import pytest
|
||||
from api.cas import casadm
|
||||
from api.cas.cache_config import CacheMode
|
||||
from core.test_run import TestRun
|
||||
from test_tools import fs_tools
|
||||
from test_tools.fs_tools import Filesystem
|
||||
from test_tools.fs_tools import Filesystem, create_directory, check_if_directory_exists, md5sum
|
||||
from test_tools.fio.fio import Fio
|
||||
from test_tools.fio.fio_param import ReadWrite, IoEngine, VerifyMethod
|
||||
from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan
|
||||
from test_utils.filesystem.file import File
|
||||
from test_tools.os_tools import sync
|
||||
from type_def.size import Unit, Size
|
||||
|
||||
@@ -72,8 +71,8 @@ def test_data_integrity_5d_dss(filesystems):
|
||||
with TestRun.step("Create filesystems and mount cores"):
|
||||
for i, core in enumerate(cores):
|
||||
mount_point = core.path.replace('/dev/', '/mnt/')
|
||||
if not fs_utils.check_if_directory_exists(mount_point):
|
||||
fs_utils.create_directory(mount_point)
|
||||
if not check_if_directory_exists(mount_point):
|
||||
create_directory(mount_point)
|
||||
TestRun.LOGGER.info(f"Create filesystem {filesystems[i].name} on {core.path}")
|
||||
core.create_filesystem(filesystems[i])
|
||||
TestRun.LOGGER.info(f"Mount filesystem {filesystems[i].name} on {core.path} to "
|
||||
@@ -106,14 +105,14 @@ def test_data_integrity_5d_dss(filesystems):
|
||||
core.unmount()
|
||||
|
||||
with TestRun.step("Calculate md5 for each core"):
|
||||
core_md5s = [File(core.full_path).md5sum() for core in cores]
|
||||
core_md5s = [md5sum(core.path) for core in cores]
|
||||
|
||||
with TestRun.step("Stop caches"):
|
||||
for cache in caches:
|
||||
cache.stop()
|
||||
|
||||
with TestRun.step("Calculate md5 for each core"):
|
||||
dev_md5s = [File(dev.full_path).md5sum() for dev in core_devices]
|
||||
dev_md5s = [md5sum(dev.full_path) for dev in core_devices]
|
||||
|
||||
with TestRun.step("Compare md5 sums for cores and core devices"):
|
||||
for core_md5, dev_md5, mode, fs in zip(core_md5s, dev_md5s, cache_modes, filesystems):
|
||||
@@ -171,14 +170,14 @@ def test_data_integrity_5d():
|
||||
fio_run.run()
|
||||
|
||||
with TestRun.step("Calculate md5 for each core"):
|
||||
core_md5s = [File(core.full_path).md5sum() for core in cores]
|
||||
core_md5s = [md5sum(core.path) for core in cores]
|
||||
|
||||
with TestRun.step("Stop caches"):
|
||||
for cache in caches:
|
||||
cache.stop()
|
||||
|
||||
with TestRun.step("Calculate md5 for each core"):
|
||||
dev_md5s = [File(dev.full_path).md5sum() for dev in core_devices]
|
||||
dev_md5s = [md5sum(dev.full_path) for dev in core_devices]
|
||||
|
||||
with TestRun.step("Compare md5 sums for cores and core devices"):
|
||||
for core_md5, dev_md5, mode in zip(core_md5s, dev_md5s, cache_modes):
|
||||
|
Reference in New Issue
Block a user