summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/e2e_test.go38
1 files changed, 17 insertions, 21 deletions
diff --git a/test/e2e_test.go b/test/e2e_test.go
index c4b03bd1..a0d87ffe 100644
--- a/test/e2e_test.go
+++ b/test/e2e_test.go
@@ -35,35 +35,31 @@ func TestAuthx(t *testing.T) {
}()
t.Run("SAML", func(t *testing.T) {
- t.Run("IdP", func(t *testing.T) {
- t.Run("metadata.xml", func(t *testing.T) {
- response := x.Must(http.Get("http://idp.example.com:8080/saml/metadata.xml"))
- assert.Equal(t, http.StatusOK, response.StatusCode)
- })
+ t.Run("GET http://idp.example.com:8080/saml/metadata.xml", func(t *testing.T) {
+ response := x.Must(http.Get("http://idp.example.com:8080/saml/metadata.xml"))
+ assert.Equal(t, http.StatusOK, response.StatusCode)
})
- t.Run("SP", func(t *testing.T) {
- t.Run("metadata.xml", func(t *testing.T) {
- response := x.Must(http.Get("http://ui.example.com:8080/saml/metadata.xml"))
- assert.Equal(t, http.StatusOK, response.StatusCode)
- })
+ t.Run("GET http://ui.example.com:8080/saml/metadata.xml", func(t *testing.T) {
+ response := x.Must(http.Get("http://ui.example.com:8080/saml/metadata.xml"))
+ assert.Equal(t, http.StatusOK, response.StatusCode)
+ })
- t.Run("ACS", func(t *testing.T) {
- x.Must(page.Goto("http://ui.example.com:8080/saml/new"))
- action := x.Must(page.Locator("#idp-form").GetAttribute("action"))
- assert.Equal(t, "http://idp.example.com:8080/saml/new", action)
- assert.NoError(t, page.Locator("#submit-button").Click())
+ t.Run("GET http://ui.example.com:8080/saml/new", func(t *testing.T) {
+ x.Must(page.Goto("http://ui.example.com:8080/saml/new"))
+ action := x.Must(page.Locator("#idp-form").GetAttribute("action"))
+ assert.Equal(t, "http://idp.example.com:8080/saml/new", action)
+ assert.NoError(t, page.Locator("#submit-button").Click())
- action = x.Must(page.Locator("#postback-form").GetAttribute("action"))
- assert.Equal(t, "http://ui.example.com:8080/saml/assertions", action)
- assert.NoError(t, page.Locator("#submit-button").Click())
- assert.Contains(t, x.Must(page.Content()), "Received SAML Response")
- })
+ action = x.Must(page.Locator("#postback-form").GetAttribute("action"))
+ assert.Equal(t, "http://ui.example.com:8080/saml/assertions", action)
+ assert.NoError(t, page.Locator("#submit-button").Click())
+ assert.Contains(t, x.Must(page.Content()), "Received SAML Response")
})
})
t.Run("OIDC", func(t *testing.T) {
- t.Run("login", func(t *testing.T) {
+ t.Run("GET http://ui.example.com:8080/oidc/new", func(t *testing.T) {
x.Must(page.Goto("http://ui.example.com:8080/oidc/new"))
assert.Contains(t, page.URL(), "http://idp.example.com:8080/oauth/authorize")
assert.NoError(t, page.Locator("#submit-button").Click())