chore: add Now, Since, AfterFunc to clock; use clock for configmaps test (#13476)

* chore: add Now, Since, AfterFunc to clock; use clock for configmaps test

* chore: update flake.nix vendor hash

Signed-off-by: Spike Curtis <spike@coder.com>

---------

Signed-off-by: Spike Curtis <spike@coder.com>
This commit is contained in:
Spike Curtis
2024-06-05 16:00:02 +04:00
committed by GitHub
parent ffcfbb6c55
commit 775fc3f5e9
9 changed files with 104 additions and 44 deletions
+2 -1
View File
@@ -18,9 +18,10 @@ func (t *Timer) fire(tt time.Time) {
panic("mock timer fired at wrong time")
}
t.mock.removeTimer(t)
t.c <- tt
if t.fn != nil {
t.fn()
} else {
t.c <- tt
}
}