mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 22:19:40 -08:00
Fix tests for append API changes
This commit is contained in:
parent
59f1e722df
commit
d0d2c38c68
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue