mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: wire quartz.Clock into Acquirer (#27291)
- Wires quartz.Clock into provisionerdserver.Acquirer - Allows overriding Acquirer in coderd.Options - Updates existing tests to use an Acquirer driven by a quartz.Mock Before this change `enterprise/coderd/prebuilds` package tests would take ~60-70s to run. After this change, it's down to ~10s. > Generated by Coder agents, massaged by this human.
This commit is contained in:
@@ -198,6 +198,7 @@ type Options struct {
|
||||
APIKeyEncryptionCache cryptokeys.EncryptionKeycache
|
||||
OIDCConvertKeyCache cryptokeys.SigningKeycache
|
||||
Clock quartz.Clock
|
||||
Acquirer *provisionerdserver.Acquirer
|
||||
TelemetryReporter telemetry.Reporter
|
||||
|
||||
ProvisionerdServerMetrics *provisionerdserver.Metrics
|
||||
@@ -655,6 +656,7 @@ func NewOptions(t testing.TB, options *Options) (func(http.Handler), context.Can
|
||||
NotificationsEnqueuer: options.NotificationsEnqueuer,
|
||||
OneTimePasscodeValidityPeriod: options.OneTimePasscodeValidityPeriod,
|
||||
Clock: options.Clock,
|
||||
Acquirer: options.Acquirer,
|
||||
AppEncryptionKeyCache: options.APIKeyEncryptionCache,
|
||||
OIDCConvertKeyCache: options.OIDCConvertKeyCache,
|
||||
ProvisionerdServerMetrics: options.ProvisionerdServerMetrics,
|
||||
|
||||
Reference in New Issue
Block a user