Return error status from --test if any of the input plugins produced an error (#6279)
This commit is contained in:
committed by
Daniel Nelson
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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user