use AddError everywhere (#2372)

This commit is contained in:
Patrick Hemmer
2017-04-24 14:13:26 -04:00
committed by Daniel Nelson
parent 801f6cb8a0
commit 06baf7cf78
95 changed files with 341 additions and 531 deletions

View File

@@ -41,7 +41,7 @@ func (p *Powerdns) Gather(acc telegraf.Accumulator) error {
for _, serverSocket := range p.UnixSockets {
if err := p.gatherServer(serverSocket, acc); err != nil {
return err
acc.AddError(err)
}
}

View File

@@ -90,7 +90,7 @@ func TestMemcachedGeneratesMetrics(t *testing.T) {
var acc testutil.Accumulator
err = p.Gather(&acc)
err = acc.GatherError(p.Gather)
require.NoError(t, err)
intMetrics := []string{"corrupt-packets", "deferred-cache-inserts",