Skip to content

Commit

Permalink
Fix unit-test
Browse files Browse the repository at this point in the history
  • Loading branch information
srebhan committed Oct 31, 2023
1 parent 9748426 commit 5138aa7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion host/host_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down

0 comments on commit 5138aa7

Please sign in to comment.