1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-08-08 22:46:33 +02:00

Add a clock package for better time mocking (#1136)

* Add a clock package for better time mocking

* Make Clock a struct so it doesn't need initialization

* Test clock package

* Use atomic for live time tests

* Refer to same clock.Mock throughout methods
This commit is contained in:
Nick Meves
2021-04-18 10:25:57 -07:00
committed by GitHub
parent 42475c28f7
commit d3423408c7
6 changed files with 565 additions and 0 deletions

1
go.mod
View File

@ -5,6 +5,7 @@ go 1.16
require (
github.com/Bose/minisentinel v0.0.0-20200130220412-917c5a9223bb
github.com/alicebob/miniredis/v2 v2.13.0
github.com/benbjohnson/clock v1.1.1-0.20210213131748-c97fc7b6bee0
github.com/bitly/go-simplejson v0.5.0
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
github.com/coreos/go-oidc v2.2.1+incompatible