1 | Unit tests for Attribute Authority Web Service Client |
---|
2 | ===================================================== |
---|
3 | The test client connects to two different test Attribute Authorities |
---|
4 | corresponding to the fictitious Service Providers Site "A" and Site "B". Each |
---|
5 | has its own respective properties file. |
---|
6 | |
---|
7 | These services must be started before running the unit tests. Start a terminal |
---|
8 | in this directory and run: |
---|
9 | |
---|
10 | $ python ./wsgi/siteAServerApp.py |
---|
11 | |
---|
12 | ...and in a separate terminal: |
---|
13 | |
---|
14 | $ python ./wsgi/siteBServerApp.py |
---|
15 | |
---|
16 | Configuration for these services is held in the files ./wsgi/site-a.ini and |
---|
17 | ./wsgi/site-b.ini respectively. |
---|
18 | |
---|
19 | Note however that the siteBServerApp.py is only needed for tests for getting |
---|
20 | mapped attribute certificates: test7GetMappedAttCert and |
---|
21 | test8GetMappedAttCertStressTest |
---|
22 | |
---|
23 | Settings for the client to these services are configured with the file |
---|
24 | attAuthorityClientTest.cfg. The default values should work as set. |
---|
25 | |
---|
26 | Problems may occur due to proxy settings (Access Denied errors); no proxy |
---|
27 | should be specified for the ports used by the services - i.e. use: |
---|
28 | |
---|
29 | $ unset http_proxy |
---|
30 | |
---|
31 | or set specific exceptions according to the address+port of the services used: |
---|
32 | |
---|
33 | $ export no_proxy=localhost:5100,localhost:5000 |
---|
34 | |
---|
35 | Run the unit tests script test_attributeauthorityclient.py from another |
---|
36 | terminal: |
---|
37 | |
---|
38 | $ python ./test_attributeauthorityclient.py |
---|
39 | |
---|
40 | Tests can be run individually e.g. |
---|
41 | |
---|
42 | $ python ./test_attributeauthorityclient.py AttributeAuthorityClientTestCase.test1GetX509Cert |
---|
43 | |
---|
44 | Running Services with the Twisted Application Server |
---|
45 | ==================================================== |
---|
46 | Services have been ported from the Twisted Application Server to run with a |
---|
47 | WSGI wrapper under Paste. Paste scripts are held in the wsgi/ sub-directory |
---|
48 | and the previous Twisted based ones in twisted/. These are untested and may |
---|
49 | be removed from future releases of NDG-Security. |
---|
50 | |
---|
51 | P J Kershaw 31/10/08 |
---|