From 5138aa7fa344ea9e9b6b3a75b544ef7ac4780a7a Mon Sep 17 00:00:00 2001 From: Sven Rebhan Date: Tue, 31 Oct 2023 17:44:35 +0100 Subject: [PATCH] Fix unit-test --- host/host_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/host/host_test.go b/host/host_test.go index 0aa092598..a54f2a256 100644 --- a/host/host_test.go +++ b/host/host_test.go @@ -140,10 +140,12 @@ func TestTemperatureStat_String(t *testing.T) { v := TemperatureStat{ SensorKey: "CPU", Temperature: 1.1, + Low: 0.1, High: 30.1, Critical: 0.1, + Alarm: 80.1, } - s := `{"sensorKey":"CPU","temperature":1.1,"sensorHigh":30.1,"sensorCritical":0.1}` + s := `{"sensorKey":"CPU","temperature":1.1,"sensorLow":0.1,"sensorHigh":30.1,"sensorCritical":0.1,"sensorAlarm":80.1}` if s != fmt.Sprintf("%v", v) { t.Errorf("TemperatureStat string is invalid, %v", fmt.Sprintf("%v", v)) }