mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-04-23 01:30:55 +00:00
sleep longer before generating any GitHib OTP codes
This commit is contained in:
@@ -2532,7 +2532,7 @@ func testSupervisorLogin(
|
||||
) {
|
||||
env := testlib.IntegrationEnv(t)
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 7*time.Minute)
|
||||
defer cancel()
|
||||
|
||||
// Infer the downstream issuer URL from the callback associated with the upstream test client registration.
|
||||
|
||||
@@ -442,7 +442,10 @@ func handleGithubOTPLoginPage(t *testing.T, b *Browser, upstream testlib.TestGit
|
||||
|
||||
// Sleep for a bit to make it less likely that we use the same OTP code twice when multiple tests are run in serial.
|
||||
// GitHub gets upset when the same OTP code gets reused.
|
||||
otpSleepSeconds := 25
|
||||
// GitHub seems to also get upset when any OTP codes are used often, like when all our GitHub tests run sequentially,
|
||||
// because sometimes auth will go to a GitHub page that says: "We were unable to authenticate your request because too
|
||||
// many codes have been submitted. Please wait a few minutes and contact support if you continue to have problems."
|
||||
otpSleepSeconds := 60
|
||||
t.Logf("sleeping %d seconds before generating a GitHub OTP code", otpSleepSeconds)
|
||||
time.Sleep(time.Duration(otpSleepSeconds) * time.Second)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user