fix: type disque SATA + df timeout Proxmox
- disk_type : rota booléen (False/True) en plus des int (0/1) — lsblk récent - df --local : évite le timeout sur montages réseau/NFS (Proxmox) - 6 nouveaux tests disk_type Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -103,6 +103,27 @@ def test_bytes_human_none():
|
||||
assert inventaire.bytes_human(None) == "?"
|
||||
|
||||
|
||||
# -- disk_type ----------------------------------------------------------------
|
||||
|
||||
def test_disk_type_nvme():
|
||||
assert inventaire.disk_type("nvme0n1", None) == "NVMe"
|
||||
|
||||
def test_disk_type_hdd_int():
|
||||
assert inventaire.disk_type("sda", 1) == "HDD"
|
||||
|
||||
def test_disk_type_ssd_int():
|
||||
assert inventaire.disk_type("sdb", 0) == "SSD"
|
||||
|
||||
def test_disk_type_hdd_bool():
|
||||
assert inventaire.disk_type("sda", True) == "HDD"
|
||||
|
||||
def test_disk_type_ssd_bool():
|
||||
assert inventaire.disk_type("sdb", False) == "SSD"
|
||||
|
||||
def test_disk_type_inconnu():
|
||||
assert inventaire.disk_type("sdc", None) == "inconnu"
|
||||
|
||||
|
||||
# ── get_smart ─────────────────────────────────────────────────────────────────
|
||||
|
||||
SMART_PASSED = """
|
||||
|
||||
Reference in New Issue
Block a user