source: TI12-security/trunk/python/ndg_security_test/ndg/security/test/integration/authz_lite/securityservicesapp.py @ 5779

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/ndg_security_test/ndg/security/test/integration/authz_lite/securityservicesapp.py@5779
Revision 5779, 877 bytes checked in by pjkersha, 10 years ago (diff)

Integrated automated start-up and shutdown of Paste http servers for unit tests.

Line 
1#!/usr/bin/env python
2"""NDG Security test harness for security web services middleware stack
3
4NERC DataGrid Project
5
6"""
7__author__ = "P J Kershaw"
8__date__ = "20/11/08"
9__copyright__ = "(C) 2009 Science and Technology Facilities Council"
10__contact__ = "Philip.Kershaw@stfc.ac.uk"
11__revision__ = "$Id$"
12import os
13from os.path import dirname, abspath, join
14
15from ndg.security.test.unit.wsgi import PasteDeployAppServer
16
17# To start run
18# $ paster serve services.ini or run this file as a script
19# $ ./securityservicesapp.py [port #]
20if __name__ == '__main__':
21    import sys
22    if len(sys.argv) > 1:
23        port = int(sys.argv[1])
24    else:
25        port = 7443
26       
27    cfgFileName='securityservices.ini'
28    cfgFilePath = os.path.join(dirname(abspath(__file__)), cfgFileName)   
29    server = PasteDeployAppServer(cfgFilePath=cfgFilePath, port=port) 
30    server.start()
Note: See TracBrowser for help on using the repository browser.