Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
clems4ever committed Aug 13, 2021
1 parent 794a02c commit 2f8d1fc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/oidc_authentication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestShouldAuthenticateSuccessfully(t *testing.T) {

assert.NoError(t, WithWebdriver(func(wd ExtendedWebDriver) error {
// In case the cookie is set, we logout the user before running the test.
wd.Get(fmt.Sprintf("%s/oauth2/logout", App2URL))
wd.Get(fmt.Sprintf("%soauth2/logout", App2URL))

wd.Get(App2URL)
wd.WaitUntilAuthenticatedWithOIDC(ctx, t, "john", "password")
Expand All @@ -31,13 +31,13 @@ func TestShouldVerifyUserRedirectedToInitialURL(t *testing.T) {

assert.NoError(t, WithWebdriver(func(wd ExtendedWebDriver) error {
// In case the cookie is set, we logout the user before running the test.
wd.Get(fmt.Sprintf("%s/oauth2/logout", App2URL))
wd.Get(fmt.Sprintf("%soauth2/logout", App2URL))

wd.Get(App2URL)
wd.WaitUntilAuthenticatedWithOIDC(ctx, t, "john", "password")
wd.WaitUntilURLIs(ctx, t, App2URL)
wd.WaitUntilBodyContains(ctx, t, "PROTECTED!")
url := fmt.Sprintf("%s/secret.html", App2URL)
url := fmt.Sprintf("%ssecret.html", App2URL)
wd.Get(url)
wd.WaitUntilURLIs(ctx, t, url)
wd.WaitUntilBodyContains(ctx, t, "SECRET!")
Expand All @@ -51,7 +51,7 @@ func TestShouldKeepUseLoggedIn(t *testing.T) {

assert.NoError(t, WithWebdriver(func(wd ExtendedWebDriver) error {
// In case the cookie is set, we logout the user before running the test.
wd.Get(fmt.Sprintf("%s/oauth2/logout", App2URL))
wd.Get(fmt.Sprintf("%soauth2/logout", App2URL))

wd.Get(App2URL)
wd.WaitUntilAuthenticatedWithOIDC(ctx, t, "john", "password")
Expand All @@ -74,7 +74,7 @@ func TestShouldFailAuthentication(t *testing.T) {

assert.NoError(t, WithWebdriver(func(wd ExtendedWebDriver) error {
// In case the cookie is set, we logout the user before running the test.
wd.Get(fmt.Sprintf("%s/oauth2/logout", App2URL))
wd.Get(fmt.Sprintf("%soauth2/logout", App2URL))

wd.Get(App2URL)
wd.WaitUntilRedirectedToDexLogin(ctx, t)
Expand Down

0 comments on commit 2f8d1fc

Please sign in to comment.