diff --git a/pkg/hubtest/parser_assert.go b/pkg/hubtest/parser_assert.go index e13cdb4a2..0f0eaedcc 100644 --- a/pkg/hubtest/parser_assert.go +++ b/pkg/hubtest/parser_assert.go @@ -348,6 +348,7 @@ func DumpTree(parser_results ParserResults, bucket_pour BucketPourInfo, opts Dum yellow := color.New(color.FgYellow).SprintFunc() red := color.New(color.FgRed).SprintFunc() green := color.New(color.FgGreen).SprintFunc() + whitelistReason := "" //get each line for tstamp, rawstr := range assoc { if opts.SkipOk { @@ -407,6 +408,9 @@ func DumpTree(parser_results ParserResults, bucket_pour BucketPourInfo, opts Dum detailsDisplay += fmt.Sprintf("\t%s\t\t%s %s evt.%s : %s -> %s\n", presep, sep, change.Type, strings.Join(change.Path, "."), change.From, yellow(change.To)) if change.Path[0] == "Whitelisted" && change.To == true { whitelisted = true + if whitelistReason == "" { + whitelistReason = parsers[parser].Evt.WhitelistReason + } } updated++ case "delete": @@ -459,6 +463,8 @@ func DumpTree(parser_results ParserResults, bucket_pour BucketPourInfo, opts Dum //did the event enter the bucket pour phase ? if _, ok := state[tstamp]["buckets"]["OK"]; ok { fmt.Printf("\t%s-------- parser success %s\n", sep, emoji.GreenCircle) + } else if whitelistReason != "" { + fmt.Printf("\t%s-------- parser success, ignored by whitelist (%s) %s\n", sep, whitelistReason, emoji.GreenCircle) } else { fmt.Printf("\t%s-------- parser failure %s\n", sep, emoji.RedCircle) }