source: TI12-security/trunk/python/MyProxyClient/test/README @ 5048

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/MyProxyClient/test/README@5048
Revision 5048, 3.3 KB checked in by pjkersha, 11 years ago (diff)

Updates to licence info and README for unit tests.

Line 
1MyProxyClient Unit Tests
2========================
3The unit test module is divided into two unit test classes:
4
5MyProxyClientLiveTestCase
6MyProxyClientInterfaceTestCase
7
8The first, MyProxyClientLiveTestCase depends on connection to a myproxy-server.
9The test certificates and files in this directory are for illustration only.
10They must be replaced with certificates issued by a CA that the myproxy-server
11is configured to trust. See http://grid.ncsa.uiuc.edu/myproxy/ for guidance on
12installing and configuring MyProxy.
13
14The second test class MyProxyClientInterfaceTestCase, performs sanity checks on
15the getting and setting of attributes.  These tests can be run without access
16to a myproxy-server service.
17
181) To run MyProxyClientLiveTestCase:
19
201.1) Start myproxy-server on it's host machine e.g. as root run,
21
22$ myproxy-server
23
241.2) Edit myProxyClient.cfg and set the hostname element to the fully
25qualified domain name of the MyProxy host OR alternatively set the environment
26variable MYPROXY_SERVER to the host name e.g.:
27
28$ export MYPROXY_SERVER=mytest.myproxy-server.somewhere
29
30The environment variable setting will override any setting in the config file. 
31You may also need to set the MYPROXY_SERVER_DN environment variable and/or
32experiment with the serverDN and serverCNPrefix config file settings to allow
33for any mismatch between the MyProxy server certificate Distinguished Name and
34the hostname of the host server.
35
36The tests involve uploading new credentials, changing password settings and
37finally removing these credentials from the MyP.  Make sure the MyProxy server you are using
38for tests is configured to allow you to carry out these operations and that
39you have test certificates issued by a CA that the MyProxy server is
40configured to trust.  If necessary download and install a copy of MyProxy for
41test purposes.  Tests may be run individually e.g. to test myProxy logon only.
42See 1.4)
43
441.3) Run the tests with the command:
45
46$ python ./test_myproxyclient.py MyProxyClientLiveTestCase
47
481.4) To run individual tests give the test method name:
49
50$ python ./test_myproxyclient.py MyProxyClientLiveTestCase.test1Store
51
52 * Note that some tests are dependent on the output of previous tests. 
53 * test1Store adds a new credential to the repository.  Running all the tests
54   together as in 3) will ensure the credential is removed afterwards.  To
55   check the existence of the credential after the test run test3Info:
56   
57   $ python ./test_myproxyclient.py MyProxyClientTestCase.test3Info
58   
59   or use MyProxy client commands on the MyProxy host: myproxy-info,
60   myproxy-destroy.  If these fail, the content of /var/myproxy on the
61   target host can be checked to see if testuser credentials still exist.
62 * See myProxyClientTest.cfg configuration file to change test parameters.
63 * See the installation guide for MyProxy trouble shooting information.
64
652) To run MyProxyClientInterfaceTestCase only:
66
67You may wish to run these tests alone if you don't have a configuration set-up
68to connect to a myproxy-server.
69
70Nb. Example certificates and private keys provided are from a test CA and are
71not for production use.
72
73$ python ./test_myproxyclient.py MyProxyClientInterfaceTestCase
74
753) To run MyProxyClientLiveTestCase and MyProxyClientInterfaceTestCase:
76
77$ python ./test_myproxyclient.py MyProxyClientLiveTestCase
78
79
80P J Kershaw 27/02/09
Note: See TracBrowser for help on using the repository browser.