add basic test for starting cas for CI
Signed-off-by: Karolina Rogowska <karolina.rogowska@intel.com>
This commit is contained in:
parent
f54a5e4be1
commit
606cc14ba9
4
test/functional/tests/basic/__init__.py
Normal file
4
test/functional/tests/basic/__init__.py
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#
|
||||||
|
# Copyright(c) 2022 Intel Corporation
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
#
|
36
test/functional/tests/basic/start_cas.py
Normal file
36
test/functional/tests/basic/start_cas.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#
|
||||||
|
# Copyright(c) 2022 Intel Corporation
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
#
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
from api.cas import casadm
|
||||||
|
from core.test_run import TestRun
|
||||||
|
from storage_devices.disk import DiskTypeSet, DiskType, DiskTypeLowerThan
|
||||||
|
from test_utils.size import Size, Unit
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.CI
|
||||||
|
@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
|
||||||
|
@pytest.mark.require_disk("core", DiskTypeLowerThan("cache"))
|
||||||
|
def test_start_cache_add_core():
|
||||||
|
"""
|
||||||
|
title: Basic test for starting cache and adding core.
|
||||||
|
description: |
|
||||||
|
Test for start cache and add core.
|
||||||
|
pass_criteria:
|
||||||
|
- Cache started successfully.
|
||||||
|
- Core added successfully.
|
||||||
|
"""
|
||||||
|
with TestRun.step("Prepare cache and core devices."):
|
||||||
|
cache_dev = TestRun.disks["cache"]
|
||||||
|
cache_dev.create_partitions([Size(500, Unit.MebiByte)])
|
||||||
|
core_dev = TestRun.disks["core"]
|
||||||
|
core_dev.create_partitions([Size(2, Unit.GibiByte)])
|
||||||
|
|
||||||
|
with TestRun.step("Start cache."):
|
||||||
|
cache = casadm.start_cache(cache_dev.partitions[0], force=True)
|
||||||
|
|
||||||
|
with TestRun.step("Add core."):
|
||||||
|
core = cache.add_core(core_dev.partitions[0])
|
Loading…
Reference in New Issue
Block a user