Skip to content

feat: Enable workspace debug logging #6838

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Mar 30, 2023
Prev Previous commit
break loop
  • Loading branch information
mtojek committed Mar 30, 2023
commit af908fed1cc7d8078203a3aeead66167133fa83d
7 changes: 4 additions & 3 deletions coderd/workspacebuilds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1258,27 +1258,28 @@ func TestWorkspaceBuildDebugMode(t *testing.T) {
defer closer.Close()

var logsProcessed int

processingLogs:
for {
select {
case <-ctx.Done():
require.Fail(t, "timeout occurred while processing logs")
return
case log, ok := <-logs:
if !ok {
goto done
break processingLogs
}

logsProcessed++

require.NotEqual(t, "dont-want-it", log.Output, "unexpected log message", "%s log message shouldn't be logged: %s")

if log.Output == "done" {
goto done
break processingLogs
}
}
}

done:
require.Len(t, echoResponses.ProvisionApply, logsProcessed)
})
}