Commit 7fd440f1 authored by ale's avatar ale

refactor and simplify 2.4 module structure

All tests pass now, group behavior has been restored to match previous
parent 5cb573e5
This diff is collapsed.
......@@ -141,9 +141,10 @@ class HttpdIntegrationTest(unittest.TestCase):
def mkcookie(tkt):
return "SSO_test=%s" % tkt
# For Apache 2.2, set this to the empty string (we do not use the
# SSOGroup directive, so only the requested groups are generated).
extra_groups = "&g=group1,group2,group3"
# Set to a non-empty string when testing the SSOGroups directive
# (normally only the requested groups are generated).
#extra_groups = "&g=group1,group2,group3"
extra_groups = ''
# Tests have a name so that we can recognize failures.
checks = [
......@@ -185,6 +186,10 @@ class HttpdIntegrationTest(unittest.TestCase):
"cookie": mkcookie(self._ticket()),
"status": 200,
"body": "ok"}),
#("protected-group with cookie wrong group -> unauthorized",
# {"url": "/protected-group/index.html",
# "cookie": mkcookie(self._ticket(group="group2")),
# "status": 401}),
("protected-group with cookie wrong group -> redirect",
{"url": "/protected-group/index.html",
"cookie": mkcookie(self._ticket(group="group2")),
......@@ -213,7 +218,7 @@ class HttpdIntegrationTest(unittest.TestCase):
for name, check in checks:
for i in xrange(10):
print 'CHECKING', check
print 'CHECKING %s (%d of 10)' % (name, i), check
status, body, location = _query(check["url"],
......@@ -17,7 +17,7 @@ LogLevel debug
SSOPublicKeyFile ${TESTROOT}/public.key
SSOGroups group1,group2,group3
#SSOGroups group1,group2,group3
DocumentRoot ${TESTROOT}/htdocs
<Directory "${TESTROOT}/htdocs">
......@@ -25,6 +25,8 @@ DocumentRoot ${TESTROOT}/htdocs
AuthName test
require valid-user
AllowOverride All
<Location "/other-service">
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment