Fix tests for append API changes

This commit is contained in:
Fabian Reinartz 2016-02-03 10:17:08 +01:00
parent 59f1e722df
commit d0d2c38c68

View File

@ -21,7 +21,8 @@ import (
type nopAppender struct{}
func (a nopAppender) Append(*model.Sample) {
func (a nopAppender) Append(*model.Sample) error {
return nil
}
func (a nopAppender) NeedsThrottling() bool {
@ -33,13 +34,14 @@ type collectResultAppender struct {
throttled bool
}
func (a *collectResultAppender) Append(s *model.Sample) {
func (a *collectResultAppender) Append(s *model.Sample) error {
for ln, lv := range s.Metric {
if len(lv) == 0 {
delete(s.Metric, ln)
}
}
a.result = append(a.result, s)
return nil
}
func (a *collectResultAppender) NeedsThrottling() bool {