Fix tests
This commit is contained in:
parent
d06281286d
commit
974f6fc762
16 changed files with 206 additions and 151 deletions
23
collector/interrupts_test.go
Normal file
23
collector/interrupts_test.go
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
package collector
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestInterrupts(t *testing.T) {
|
||||
file, err := os.Open("fixtures/interrupts")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
interrupts, err := parseInterrupts(file)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if want, got := "5031", interrupts["NMI"].values[1]; want != got {
|
||||
t.Errorf("want interrupts %s, got %s", want, got)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue