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

This commit is contained in:
Frank Riley 2019-08-16 14:44:38 -07:00 committed by Daniel Nelson
parent 3ed25b1269
commit a079e2d569
1 changed files with 3 additions and 0 deletions

View File

@ -235,6 +235,9 @@ func (a *Agent) Test(ctx context.Context, waitDuration time.Duration) error {
a.stopServiceInputs() a.stopServiceInputs()
} }
if NErrors.Get() > 0 {
return fmt.Errorf("One or more input plugins had an error")
}
return nil return nil
} }