mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
0a970aef8a
This moves the OpenID Connect storage from memory into the SQL storage, making it persistent and allowing it to be used with clustered deployments like the rest of Authelia.
37 lines
886 B
Go
37 lines
886 B
Go
package suites
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/go-rod/rod"
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func (rs *RodSession) verifyIsOIDC(t *testing.T, page *rod.Page, pattern, url string) {
|
|
page.MustElementR("body", pattern)
|
|
rs.verifyURLIs(t, page, url)
|
|
}
|
|
|
|
func (rs *RodSession) verifyIsOIDCErrorPage(t *testing.T, page *rod.Page, errorCode, errorDescription, errorURI, state string) {
|
|
testCases := []struct {
|
|
ElementID, ElementText string
|
|
}{
|
|
{"error", errorCode},
|
|
{"error_description", errorDescription},
|
|
{"error_uri", errorURI},
|
|
{"state", state},
|
|
}
|
|
|
|
for _, tc := range testCases {
|
|
t.Run(tc.ElementID, func(t *testing.T) {
|
|
if tc.ElementText == "" {
|
|
t.Skip("Test Skipped as the element is not expected.")
|
|
}
|
|
|
|
text, err := rs.WaitElementLocatedByID(t, page, tc.ElementID).Text()
|
|
assert.NoError(t, err)
|
|
assert.Equal(t, tc.ElementText, text)
|
|
})
|
|
}
|
|
}
|