openmicroscopy/openmicroscopy — pull request #1751 by sbesson (2013-11-11 20:34:05+00:00)
Title: CLI integration tests: chgrp plugin

This PR
- adds a first series of integration tests for the CLI `chgrp` plugin
- split the `CLITest` class into two concrete classes to perform CLI tests as root vs non-root
- fix the group existence test as only group names were checked previously
- fixes the plugin to check the session owner is a member of the target group (see https://trac.openmicroscopy.org.uk/ome/ticket/10968)

To test this PR:
- check the integration tests pass in the OmeroPy-integration-develop job
- check all the following fail gracefully with a comprehensible message:
````
bin/omero chgrp -1 /Image:id
bin/omero chgrp Group:-1 /Image:id
bin/omero chgrp ExperimenterGroup:-1 /Image:id
bin/omero chgrp this_is_not_a_group /Image:id
````

- check
```
bin/omero chgrp gid /Image:id
```

fails if the session owner is not a member of `did`, whether he is an admin or not.

---

--no-rebase