From a079e2d569b7e279b1a6cb32f5d366a36be08008 Mon Sep 17 00:00:00 2001 From: Frank Riley Date: Fri, 16 Aug 2019 14:44:38 -0700 Subject: [PATCH] Return error status from --test if any of the input plugins produced an error (#6279) --- agent/agent.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/agent/agent.go b/agent/agent.go index aa3e32a43..636c4ba68 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -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 }