forked from forgejo/forgejo
fail test when log.Error is called
except for some specific messages (to make the test pass for now)
This commit is contained in:
parent
af0bb6e68a
commit
e43c6cd9df
5 changed files with 206 additions and 35 deletions
|
@ -145,7 +145,10 @@ func TestMain(m *testing.M) {
|
|||
// Instead, "No tests were found", last nonsense log is "According to the configuration, subsequent logs will not be printed to the console"
|
||||
exitCode := m.Run()
|
||||
|
||||
testlogger.WriterCloser.Reset()
|
||||
if err := testlogger.WriterCloser.Reset(); err != nil {
|
||||
fmt.Printf("testlogger.WriterCloser.Reset: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
if err = util.RemoveAll(setting.Indexer.IssuePath); err != nil {
|
||||
fmt.Printf("util.RemoveAll: %v\n", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue