add unit test for sensors.TemperaturesWithContext

pull/1725/head
Sven Nierlein 7 months ago
parent 45e3591650
commit e731c602e1

@ -3,8 +3,11 @@
package sensors
import (
"context"
"fmt"
"testing"
"github.com/shirou/gopsutil/v4/sensors"
)
func TestTemperatureStat_String(t *testing.T) {
@ -19,3 +22,8 @@ func TestTemperatureStat_String(t *testing.T) {
t.Errorf("TemperatureStat string is invalid, %v", fmt.Sprintf("%v", v))
}
}
func TestTemperatures(t *testing.T) {
// make sure it does not segfault
sensors.TemperaturesWithContext(context.TODO())
}

Loading…
Cancel
Save