mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-10 04:41:10 +00:00
27 lines
802 B
Python
27 lines
802 B
Python
import unittest
|
|
|
|
from misc.disks import LVAttr
|
|
|
|
|
|
class TestDisks(unittest.TestCase):
|
|
def test_lv_attr_declaration(self):
|
|
self.assertEqual(
|
|
LVAttr.from_str("rwi-aor---", "Data/lvol0"),
|
|
LVAttr(
|
|
vol_type=LVAttr.VolType.RAID,
|
|
permissions=LVAttr.Permissions.WRITABLE,
|
|
allocation_policy=LVAttr.AllocationPolicy.INHERITED,
|
|
fixed_minor=False,
|
|
state=LVAttr.State.ACTIVE,
|
|
is_open=LVAttr.IsOpen.OPEN,
|
|
target_type=LVAttr.TargetType.RAID,
|
|
zero_before_use=False,
|
|
health=LVAttr.Health.OK,
|
|
skip_activation=False,
|
|
name="Data/lvol0",
|
|
),
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|