Update Copyright header point to COPYING file
[cascardo/ipsilon.git] / tests / pgdb.py
index 12f1cf2..78800ff 100755 (executable)
@@ -1,22 +1,6 @@
 #!/usr/bin/python
 #
-# Copyright (C) 2014  Simo Sorce <simo@redhat.com>
-#
-# see file 'COPYING' for use and warranty information
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
+# Copyright (C) 2014 Ipsilon project Contributors, for license see COPYING
 
 from helpers.common import IpsilonTestBase  # pylint: disable=relative-import
 from helpers.http import HttpSessions  # pylint: disable=relative-import
@@ -36,14 +20,17 @@ idp_g = {'TEMPLATES': '${TESTDIR}/templates/install',
 
 
 idp_a = {'hostname': '${ADDRESS}:${PORT}',
+         'users_dburi': 'postgresql://@127.0.0.10:45432/users',
          'database_url': 'postgresql://@127.0.0.10:45432/%(dbname)s',
+         'session_type': 'sql',
+         'session_dburi': 'postgresql://@127.0.0.10:45432/sessions',
          'admin_user': '${TEST_USER}',
          'system_user': '${TEST_USER}',
          'instance': '${NAME}',
          'secure': 'no',
          'testauth': 'yes',
          'pam': 'no',
-         'krb': 'no',
+         'gssapi': 'no',
          'ipa': 'no',
          'server_debugging': 'True'}
 
@@ -133,7 +120,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)