From 5c264b043fcc01be6c870b77f668f9569bc3080a Mon Sep 17 00:00:00 2001 From: Ice3man Date: Tue, 1 Mar 2022 13:28:43 +0530 Subject: [PATCH] Added debug printing to failing functional tests --- v2/pkg/testutils/integration.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/v2/pkg/testutils/integration.go b/v2/pkg/testutils/integration.go index f8bfcae9..a681c286 100644 --- a/v2/pkg/testutils/integration.go +++ b/v2/pkg/testutils/integration.go @@ -53,6 +53,9 @@ func RunNucleiBareArgsAndGetResults(debug bool, extra ...string) ([]string, erro cmd.Args = append(cmd.Args, "-silent") } data, err := cmd.Output() + if debug { + fmt.Println(string(data)) + } if err != nil { return nil, err } @@ -76,6 +79,9 @@ func RunNucleiBinaryAndGetLoadedTemplates(nucleiBinary string, debug bool, args fmt.Println(cmd.String()) } data, err := cmd.CombinedOutput() + if debug { + fmt.Println(string(data)) + } if err != nil { return "", err }