Skip to content

Commit

Permalink
test: increase waittime
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Oct 19, 2020
1 parent cddf29e commit 5e911d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions selfservice/strategy/password/registration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,14 @@ func TestRegistration(t *testing.T) {
})

t.Run("case=should return an error because the request is expired", func(t *testing.T) {
viper.Set(configuration.ViperKeySelfServiceRegistrationRequestLifespan, "100ms")
viper.Set(configuration.ViperKeySelfServiceRegistrationRequestLifespan, "500ms")
defer viper.Set(configuration.ViperKeySelfServiceRegistrationRequestLifespan, "10m")

t.Run("type=api", func(t *testing.T) {
f := testhelpers.InitializeRegistrationFlowViaAPI(t, apiClient, publicTS)
c := testhelpers.GetRegistrationFlowMethodConfig(t, f.Payload, identity.CredentialsTypePassword.String())

time.Sleep(time.Millisecond * 200)
time.Sleep(time.Millisecond * 600)
actual, res := testhelpers.RegistrationMakeRequest(t, true, c, apiClient, "{}")
assert.Contains(t, res.Request.URL.String(), publicTS.URL+registration.RouteGetFlow)
assert.NotEqual(t, f.Payload.ID, gjson.Get(actual, "id").String(), "%s", actual)
Expand All @@ -172,7 +172,7 @@ func TestRegistration(t *testing.T) {
f := testhelpers.InitializeRegistrationFlowViaBrowser(t, browserClient, publicTS)
c := testhelpers.GetRegistrationFlowMethodConfig(t, f.Payload, identity.CredentialsTypePassword.String())

time.Sleep(time.Millisecond * 200)
time.Sleep(time.Millisecond * 600)
actual, res := testhelpers.RegistrationMakeRequest(t, false, c, browserClient, "")
assert.Contains(t, res.Request.URL.String(), uiTS.URL+"/registration-ts")
assert.NotEqual(t, f.Payload.ID, gjson.Get(actual, "id").String(), "%s", actual)
Expand Down

0 comments on commit 5e911d6

Please sign in to comment.