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.
This commit is contained in:
2 files changed
+13
-1
No files matched your search
@@ -495,6 +495,8 @@ type TestControllerOpts struct {
|
|||||||
|
|
||||||
// Toggle worker auth debugging
|
// Toggle worker auth debugging
|
||||||
WorkerAuthDebuggingEnabled *atomic.Bool
|
WorkerAuthDebuggingEnabled *atomic.Bool
|
||||||
|
|
||||||
|
DisableRateLimiting bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewTestController(t testing.TB, opts *TestControllerOpts) *TestController {
|
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{
|
return &Config{
|
||||||
RawConfig: opts.Config,
|
RawConfig: opts.Config,
|
||||||
Server: tc.b,
|
Server: tc.b,
|
||||||
|
|||||||
@@ -415,7 +415,13 @@ func TestUpdateAfterKeyRotation(t *testing.T) {
|
|||||||
// This prevents us from running tests in parallel.
|
// This prevents us from running tests in parallel.
|
||||||
tg.SetupSuiteTargetFilters(t)
|
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()
|
ctx := tc.Context()
|
||||||
client := tc.Client()
|
client := tc.Client()
|
||||||
token := tc.Token()
|
token := tc.Token()
|
||||||
|
|||||||
Reference in new issue
Block a user