These are some Json representation tests we can run when deploying/migrating.
- Copy settings.tmpl to settings.py and edit that for your local configuration.
- You must create the base group, as identified in your settings.py, and permit your certificate to be a subgroup creator. Call it "u_<yournetid>_test".
- You must identify your client and ca certs.
- The membership tests use real ids.
- Make a virtual env and install what's in requirements.txt. The latest version of python I've been able to run these tests with is 3.8.14, as some newer version introduced some breaking changes.
$ pyenv local 3.8.14
$ virtualenv -p 3.8.14 env
$ . ./env/bin/activate
$ pip install `cat requirements.txt`
$ nosetests .
... or
$ nosetests --with-timer .
to get timing information for each test run - The tests should clean up after themselves.
Note that some of the tests rely on ldap membership synchronizing. That requires the ldap_provisioner running on the target service.
- Use: pycodestyle --max-line-length=150 *.py test