test(credentials): Disable rate limiting for test

This test quickly polls a list endpoint, which exceeds the default rate
limits before the test can complete in CI.
pull/4092/head
Timothy Messier 2 years ago
parent cd21f10a3b
commit 758e7b8bf1
No known key found for this signature in database
GPG Key ID: EFD2F184F7600572

@ -495,6 +495,8 @@ type TestControllerOpts struct {
// Toggle worker auth debugging
WorkerAuthDebuggingEnabled *atomic.Bool
DisableRateLimiting bool
}
func NewTestController(t testing.TB, opts *TestControllerOpts) *TestController {
@ -806,6 +808,10 @@ func TestControllerConfig(t testing.TB, ctx context.Context, tc *TestController,
}
}
if opts.DisableRateLimiting {
opts.Config.Controller.ApiRateLimitDisable = true
}
return &Config{
RawConfig: opts.Config,
Server: tc.b,

@ -415,7 +415,13 @@ func TestUpdateAfterKeyRotation(t *testing.T) {
// This prevents us from running tests in parallel.
tg.SetupSuiteTargetFilters(t)
tc := controller.NewTestController(t, &controller.TestControllerOpts{SchedulerRunJobInterval: 100 * time.Millisecond})
tc := controller.NewTestController(
t,
&controller.TestControllerOpts{
SchedulerRunJobInterval: 100 * time.Millisecond,
DisableRateLimiting: true,
},
)
ctx := tc.Context()
client := tc.Client()
token := tc.Token()

Loading…
Cancel
Save