mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-10 07:34:09 -08:00
15 lines
242 B
Go
15 lines
242 B
Go
package collector
|
|
|
|
import "testing"
|
|
|
|
func TestLoad(t *testing.T) {
|
|
load, err := parseLoad("0.21 0.37 0.39 1/719 19737")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
if want := 0.21; want != load {
|
|
t.Fatalf("want load %f, got %f", want, load)
|
|
}
|
|
}
|