(stream, line string)
| 78 | } |
| 79 | func (m *SyncMockDriver) PostProcess() error { return nil } |
| 80 | func (m *SyncMockDriver) WriteLogEntry(stream, line string) error { |
| 81 | m.mu.Lock() |
| 82 | defer m.mu.Unlock() |
| 83 | if stream == streamStdout { |
| 84 | m.receivedStdout = append(m.receivedStdout, line) |
| 85 | } else { |
| 86 | m.receivedStderr = append(m.receivedStderr, line) |
| 87 | } |
| 88 | return nil |
| 89 | } |
| 90 | |
| 91 | func TestLoggingProcessAdapter(t *testing.T) { |
| 92 | // Will process a normal String to stdout and a bigger one to stderr |