Add additional test for mdadm_linux collector
This commit is contained in:
parent
a09bbaacd1
commit
8c809cd29a
|
@ -0,0 +1,5 @@
|
||||||
|
Personalities : [invalid]
|
||||||
|
md3 : invalid
|
||||||
|
314159265 blocks 64k chunks
|
||||||
|
|
||||||
|
unused devices: <none>
|
|
@ -46,3 +46,11 @@ func TestMdadm(t *testing.T) {
|
||||||
t.Errorf("expected number of parsed md-device to be %d, but was %d", len(refs), len(mdStates))
|
t.Errorf("expected number of parsed md-device to be %d, but was %d", len(refs), len(mdStates))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestInvalidMdstat(t *testing.T) {
|
||||||
|
_, err := parseMdstat("fixtures/proc/mdstat_invalid")
|
||||||
|
|
||||||
|
if err == nil {
|
||||||
|
t.Fatalf("parsing of invalid reference file did not find any errors")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue