mirror of
https://github.com/coder/coder.git
synced 2025-07-08 11:39:50 +00:00
fix: Update database fake to check for nil time when streaming logs (#2664)
This caused a test flake seen here: https://github.com/coder/coder/runs/7056544834?check_suite_focus=true
This commit is contained in:
@ -1360,10 +1360,10 @@ func (q *fakeQuerier) GetProvisionerLogsByIDBetween(_ context.Context, arg datab
|
||||
if jobLog.JobID.String() != arg.JobID.String() {
|
||||
continue
|
||||
}
|
||||
if jobLog.CreatedAt.After(arg.CreatedBefore) {
|
||||
if !arg.CreatedBefore.IsZero() && jobLog.CreatedAt.After(arg.CreatedBefore) {
|
||||
continue
|
||||
}
|
||||
if jobLog.CreatedAt.Before(arg.CreatedAfter) {
|
||||
if !arg.CreatedAfter.IsZero() && jobLog.CreatedAt.Before(arg.CreatedAfter) {
|
||||
continue
|
||||
}
|
||||
logs = append(logs, jobLog)
|
||||
|
Reference in New Issue
Block a user