Skip to content

Commit

Permalink
Add more unit tests and logs
Browse files Browse the repository at this point in the history
  • Loading branch information
xxx0624 committed Apr 3, 2024
1 parent e11e03e commit f8bf906
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions logger/buffered_logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ func (bl *bufferedLogger) Start(
pipe := p

errGroup.Go(func() error {
debug.SendEventsToLog(DaemonName, fmt.Sprintf("Reading logs from pipe %s", source), debug.DEBUG, 0)
logErr := bl.saveLogMessagesToRingBuffer(ctx, pipe, source)
if logErr != nil {
err := fmt.Errorf("failed to send logs from pipe %s: %w", source, logErr)
Expand Down
1 change: 0 additions & 1 deletion logger/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ func TestNewInfo(t *testing.T) {
// TestTracingLogRouting verifies the expected number of bytes are read from the source/containers' pipe files and the
// expected number of bytes are sent to the destination/the log driver.
func TestTracingLogRouting(t *testing.T) {

// Create a tmp file that used to mock the io pipe where the logger reads log
// messages from.
tmpIOSource, err := os.CreateTemp("", "")
Expand Down

0 comments on commit f8bf906

Please sign in to comment.