/gws-tester-fox

Fox's additional group service tests

Primary LanguagePython

Group Web Service tester

These are some Json representation tests we can run when deploying/migrating.

Settings and groups setup

  • 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__test".
  • You must identify your client and ca certs.
  • The membership tests use real ids.

Testing

  • 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.2, as some newer version introduced some breaking changes.
    $ pyenv local 3.8.2
    $ virtualenv -p 3.8.2 env
    $ . ./env/bin/activate
    $ pip install `cat requirements.txt`
    $ nosetests .
  • 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.

Style

  • Use: pycodestyle --max-line-length=150 *.py test