diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/helpers/http.py | 9 | ||||
-rwxr-xr-x | tests/pgdb.py | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/helpers/http.py b/tests/helpers/http.py index dc7fbd5..2478e2a 100755 --- a/tests/helpers/http.py +++ b/tests/helpers/http.py @@ -232,6 +232,15 @@ class HttpSessions(object): page.expected_value('//div[@id="welcome"]/p/text()', 'Welcome %s!' % srv['user']) + def logout_from_idp(self, idp): + + srv = self.servers[idp] + target_url = '%s/%s/logout' % (srv['baseuri'], idp) + + r = self.access('get', target_url) + if r.status_code != 200: + raise ValueError("Logout from idp failed: %s" % repr(r)) + def get_sp_metadata(self, idp, sp): idpsrv = self.servers[idp] idpuri = idpsrv['baseuri'] diff --git a/tests/pgdb.py b/tests/pgdb.py index a738052..ae4b47c 100755 --- a/tests/pgdb.py +++ b/tests/pgdb.py @@ -136,7 +136,13 @@ if __name__ == '__main__': sess.add_server(spname, 'http://127.0.0.11:45081') print "test1: Authenticate to IDP ...", + sys.stdout.flush() try: + print 'Stress-testing the database connections...', + sys.stdout.flush() + for i in xrange(50): + sess.auth_to_idp(idpname) + sess.logout_from_idp(idpname) sess.auth_to_idp(idpname) except Exception, e: # pylint: disable=broad-except print >> sys.stderr, " ERROR: %s" % repr(e) |