Return error status from --test if any of the input plugins produced an error (#6279)

(cherry picked from commit a079e2d569)
This commit is contained in:
Frank Riley
2019-08-16 14:55:02 -07:00
committed by Daniel Nelson
parent 6ccdf5cbc2
commit 71fe065c78
+3
View File
@@ -205,6 +205,9 @@ func (a *Agent) Test(ctx context.Context) error {
}
}
if NErrors.Get() > 0 {
return fmt.Errorf("One or more input plugins had an error")
}
return nil
}