From c3e8ec473f60d6d5eeb3bc23b9618ca250738555 Mon Sep 17 00:00:00 2001 From: Slavek Licehammer Date: Wed, 9 Dec 2020 23:39:26 +0100 Subject: [PATCH] Fix tests for demo/shibboleth Fix tests for internal SAML. Add tests for Shibboleth integration. --- demo/shibboleth/tests/main.bats | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/demo/shibboleth/tests/main.bats b/demo/shibboleth/tests/main.bats index a480fdb..aca5160 100755 --- a/demo/shibboleth/tests/main.bats +++ b/demo/shibboleth/tests/main.bats @@ -32,13 +32,13 @@ load ../../../library check_health_shibboleth_idp } -@test "040 Check Shibboleth redirection (/midpoint/self/dashboard)" { - curl -k --write-out %{redirect_url} --silen --output /dev/null https://localhost:8443/midpoint/self/dashboard | grep 'https:\/\/localhost:8443\/midpoint\/auth\/gui-default\/mySamlSso\/discovery?idp=https%3A%2F%2Fidptestbed%2Fidp%2Fshibboleth' +@test "040 Check internal SAML redirection (/midpoint/auth/saml-internal)" { + curl -k --write-out %{redirect_url} --silen --output /dev/null https://localhost:8443/midpoint/auth/saml-internal/ | grep 'https:\/\/localhost:8443\/midpoint\/auth\/saml-internal\/mySamlSso\/discovery?idp=https%3A%2F%2Fidptestbed%2Fidp%2Fshibboleth' } -@test "041 Check Shibboleth redirection action (midpoint/..../discovery?...)" { +@test "041 Check internal SAML redirection action (midpoint/..../discovery?...)" { TMPFILE=$(mktemp /tmp/samlForm.XXXXXX) - curl -k https://localhost:8443/midpoint/auth/gui-default/mySamlSso/discovery?idp=https://idptestbed/idp/shibboleth >$TMPFILE || (rm $TMPFILE ; return 1) + curl -k https://localhost:8443/midpoint/auth/saml-internal/mySamlSso/discovery?idp=https://idptestbed/idp/shibboleth >$TMPFILE || (rm $TMPFILE ; return 1) if (grep -q "