From 71fe065c788a6c37570ba1c5f6a9bb21165d7fcb 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) (cherry picked from commit a079e2d569b7e279b1a6cb32f5d366a36be08008) --- agent/agent.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/agent/agent.go b/agent/agent.go index 2687bbc0f2eb0..e50241c0f69d3 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -205,6 +205,9 @@ func (a *Agent) Test(ctx context.Context) error { } } + if NErrors.Get() > 0 { + return fmt.Errorf("One or more input plugins had an error") + } return nil }