mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	migrations: add test for importing pull requests in gitea uploader (#18752)
* logs: add the buffer logger to inspect logs during testing Signed-off-by: Loïc Dachary <loic@dachary.org> * migrations: add test for importing pull requests in gitea uploader Signed-off-by: Loïc Dachary <loic@dachary.org> * for each git.OpenRepositoryCtx, call Close * Content is expected to return the content of the log * test for errors before defer Co-authored-by: Loïc Dachary <loic@dachary.org> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
		| @@ -216,6 +216,12 @@ func (m *MultiChannelledLog) GetEventLogger(name string) EventLogger { | ||||
| 	return m.loggers[name] | ||||
| } | ||||
|  | ||||
| // GetEventProvider returns a sub logger provider content from this MultiChannelledLog | ||||
| func (m *MultiChannelledLog) GetLoggerProviderContent(name string) (string, error) { | ||||
| 	channelledLogger := m.GetEventLogger(name).(*ChannelledLog) | ||||
| 	return channelledLogger.loggerProvider.Content() | ||||
| } | ||||
|  | ||||
| // GetEventLoggerNames returns a list of names | ||||
| func (m *MultiChannelledLog) GetEventLoggerNames() []string { | ||||
| 	m.rwmutex.RLock() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user