mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +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() {
|
if jobLog.JobID.String() != arg.JobID.String() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if jobLog.CreatedAt.After(arg.CreatedBefore) {
|
if !arg.CreatedBefore.IsZero() && jobLog.CreatedAt.After(arg.CreatedBefore) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if jobLog.CreatedAt.Before(arg.CreatedAfter) {
|
if !arg.CreatedAfter.IsZero() && jobLog.CreatedAt.Before(arg.CreatedAfter) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
logs = append(logs, jobLog)
|
logs = append(logs, jobLog)
|
||||||
|
Reference in New Issue
Block a user