test(pkg/storage): add test for compression and rounding
This commit is contained in:
@ -9,12 +9,12 @@ import (
|
||||
|
||||
"github.com/Masterminds/semver"
|
||||
"github.com/go-flucky/flucky/pkg/config"
|
||||
"github.com/volker-raschek/go-logger/pkg/logger"
|
||||
"github.com/go-flucky/flucky/pkg/rgbled"
|
||||
"github.com/go-flucky/flucky/pkg/sensor"
|
||||
"github.com/go-flucky/flucky/pkg/storage/db"
|
||||
"github.com/go-flucky/flucky/pkg/storage/logfile"
|
||||
"github.com/go-flucky/flucky/pkg/types"
|
||||
"github.com/volker-raschek/go-logger/pkg/logger"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -102,7 +102,7 @@ func Start(cnf *config.Configuration, cleanCacheInterval time.Duration, compress
|
||||
flogger.Error("Can not turn on blue info light: %v", err)
|
||||
}
|
||||
|
||||
if err := logfile.Append(measuredValuesLogfile, compression, round, measuredValuesCache); err != nil {
|
||||
if err := logfile.Append(measuredValuesLogfile, measuredValuesCache); err != nil {
|
||||
err2 := rgbled.Error(rgbLEDs)
|
||||
if err2 != nil {
|
||||
flogger.Error("Can not turn on red info light: %v", err2)
|
||||
@ -136,7 +136,7 @@ func Start(cnf *config.Configuration, cleanCacheInterval time.Duration, compress
|
||||
}
|
||||
|
||||
flogger.Warn("Save remaining data from the cache")
|
||||
err = logfile.Append(measuredValuesLogfile, compression, round, measuredValuesCache)
|
||||
err = logfile.Append(measuredValuesLogfile, measuredValuesCache)
|
||||
if err != nil {
|
||||
flogger.Fatal("%v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user