Return error status from --test if any of the input plugins produced an error (#6279)
This commit is contained in:
parent
3ed25b1269
commit
a079e2d569
|
@ -235,6 +235,9 @@ func (a *Agent) Test(ctx context.Context, waitDuration time.Duration) error {
|
|||
a.stopServiceInputs()
|
||||
}
|
||||
|
||||
if NErrors.Get() > 0 {
|
||||
return fmt.Errorf("One or more input plugins had an error")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue