Skip to content

Commit

Permalink
Fix influxdata#6278: Have test mode return an error if any of the inp…
Browse files Browse the repository at this point in the history
…ut plugins produced an error.
  • Loading branch information
fhriley authored and Frank Riley committed Aug 16, 2019
1 parent 5e06e56 commit 94a257b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 94a257b

Please sign in to comment.