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 configuration. As they are also used in other tests, |
---|
6 | this configuration is held in a separate config/ directory parallel to this |
---|
7 | one. |
---|
8 | |
---|
9 | These services must be started before running the unit tests. Start a terminal |
---|
10 | in this directory and run: |
---|
11 | |
---|
12 | $ python ../../config/attributeauthority/sitea/siteAServerApp.py |
---|
13 | |
---|
14 | ...and in a separate terminal: |
---|
15 | |
---|
16 | $ python ../../config/attributeauthority/siteb/siteBServerApp.py |
---|
17 | |
---|
18 | Configuration for these services is held in the files |
---|
19 | |
---|
20 | ../../config/attributeauthority/sitea/site-a.ini and |
---|
21 | ../../config/attributeauthority/siteb/site-b.ini |
---|
22 | |
---|
23 | respectively. |
---|
24 | |
---|
25 | Note however that the siteBServerApp.py is only needed for tests for getting |
---|
26 | mapped attribute certificates: test07GetMappedAttCert and |
---|
27 | test08GetMappedAttCertStressTest |
---|
28 | |
---|
29 | Settings for the client to these services are configured with the file |
---|
30 | attAuthorityClientTest.cfg. The default values should work as set. |
---|
31 | |
---|
32 | Problems may occur due to proxy settings (Access Denied errors); no proxy |
---|
33 | should be specified for the ports used by the services - i.e. use: |
---|
34 | |
---|
35 | $ unset http_proxy |
---|
36 | |
---|
37 | or set specific exceptions according to the address+port of the services used: |
---|
38 | |
---|
39 | $ export no_proxy=localhost:5100,localhost:5000 |
---|
40 | |
---|
41 | Run the unit tests script test_attributeauthorityclient.py from another |
---|
42 | terminal: |
---|
43 | |
---|
44 | $ python ./test_attributeauthorityclient.py |
---|
45 | |
---|
46 | Tests can be run individually e.g. |
---|
47 | |
---|
48 | $ python ./test_attributeauthorityclient.py AttributeAuthorityClientTestCase.test01GetHostInfo |
---|
49 | |
---|
50 | P J Kershaw 24/12/08 |
---|