mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-10 12:45:19 +00:00
check disk health
This commit is contained in:
parent
df9647708d
commit
47c110f83e
6 changed files with 239 additions and 2 deletions
27
tests/test_disks.py
Normal file
27
tests/test_disks.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue