diff --git a/sensors/sensors_test.go b/sensors/sensors_test.go index 454316a9c..ff13867b2 100644 --- a/sensors/sensors_test.go +++ b/sensors/sensors_test.go @@ -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()) +}