From 4c306187a6d0b4875d385bf0e3ce8d6995ca15d6 Mon Sep 17 00:00:00 2001 From: AlteredCoder <64792091+AlteredCoder@users.noreply.github.com> Date: Tue, 14 Dec 2021 11:08:06 +0100 Subject: [PATCH] fix hubtest --no-clean when failure (#1088) --- cmd/crowdsec-cli/hubtest.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/crowdsec-cli/hubtest.go b/cmd/crowdsec-cli/hubtest.go index 88f9c572c..38b3c8a98 100644 --- a/cmd/crowdsec-cli/hubtest.go +++ b/cmd/crowdsec-cli/hubtest.go @@ -120,7 +120,7 @@ cscli hubtest create my-scenario-test --parsers crowdsecurity/nginx --scenarios LogFile: logFileName, LogType: logType, IgnoreParsers: ignoreParsers, - Labels: labels, + Labels: labels, } configFilePath := filepath.Join(testPath, "config.yaml") @@ -255,7 +255,7 @@ cscli hubtest create my-scenario-test --parsers crowdsecurity/nginx --scenarios fmt.Println() } } - if !forceClean { + if !forceClean && !noClean { prompt := &survey.Confirm{ Message: fmt.Sprintf("\nDo you want to remove runtime folder for test '%s'? (default: Yes)", test.Name), Default: true,