Procházet zdrojové kódy

cscli hubtest whitelist (#2479)

* Initial tests

* Always print whitelist as we can compare if we mess up the opposite way
Laurence Jones před 1 rokem
rodič
revize
37c0c067a8
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  1. 4 0
      pkg/hubtest/parser_assert.go

+ 4 - 0
pkg/hubtest/parser_assert.go

@@ -255,6 +255,10 @@ func (p *ParserAssert) AutoGenParserAssert() string {
 						ret += base + line
 					}
 				}
+				ret += fmt.Sprintf(`results["%s"]["%s"][%d].Evt.Whitelisted == %t`+"\n", stage, parser, pidx, result.Evt.Whitelisted)
+				if result.Evt.WhitelistReason != "" {
+					ret += fmt.Sprintf(`results["%s"]["%s"][%d].Evt.WhitelistReason == "%s"`+"\n", stage, parser, pidx, Escape(result.Evt.WhitelistReason))
+				}
 			}
 		}
 	}