feat(agent): enrich zpool summary with type, scan state, vdev list
This commit is contained in:
parent
a4f4d3ca51
commit
e763ea96bd
3 changed files with 61 additions and 5 deletions
|
|
@ -32,10 +32,19 @@ defmodule ProxmoxAgent.Collectors.ZfsTest do
|
|||
assert rpool.size_bytes == 500_000_000_000
|
||||
assert rpool.error_count == 0
|
||||
assert rpool.degraded_vdev_count == 0
|
||||
assert rpool.pool_type == "mirror"
|
||||
assert rpool.scan_function == "scrub"
|
||||
assert rpool.scan_state == "FINISHED"
|
||||
assert [%{name: "mirror-0", type: "mirror", state: "ONLINE",
|
||||
read_errors: 0, write_errors: 0, checksum_errors: 0}] = rpool.vdevs
|
||||
|
||||
assert tank.health == "DEGRADED"
|
||||
assert tank.error_count == 2
|
||||
assert tank.degraded_vdev_count == 1
|
||||
assert tank.pool_type == "raidz2"
|
||||
assert tank.scan_state == "SCANNING"
|
||||
assert [%{name: "raidz2-0", type: "raidz2", state: "DEGRADED",
|
||||
checksum_errors: 2}] = tank.vdevs
|
||||
end
|
||||
|
||||
test "populates errors list when zpool fails" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue