Commit 1fe6c0fb authored by hparraga's avatar hparraga
Browse files

add tests for api

parent 05bc7e28
......@@ -8,7 +8,7 @@ To run the test cases:
```
source etc/dm.setup.sh
python test/python/dmtest/ds_web_service/api/test_globus_group_ds_api.py
python data-management/test/python/dmtest/ds_web_service/api/test_globus_group_ds_api.py
```
## Coverage
......@@ -20,9 +20,73 @@ python -m coverage report
python -m coverage html #detailed html reports
```
Last run coverage: 0%
Last run coverage:
/local/DataManagement/4.1.5/src/python/dm/ds_web_service/api/globusGroupDsApi.py 99%
## Test Scenarios
## Test Scenarios - Globus Group API
### create globus group
- [ ] error if user not authorized
- [X] error if no experiment name
- [X] error if given experiment name doesn't belong to an experiment
- [X] error if group already exists for experiment
- [X] creates a globus group for given experiment
- [X] if members listed, adds members to group
- [X] if managers listed, adds managers to group
- [X] if admins listed, adds admins to group
- [X] if members, managers, and admins listed, adds all members, managers, and admins to group
### get globus group by id
- [ ] error if user not authorized
- [X] error if no id
- [X] gets group with given id
what if id doesn't match an existing group?
### get globus group by experiment name
- [ ] error if user not authorized
- [X] error if no name
- [X] gets group for a given experiment
what if the experiment does exist?
what if the experiment doesn't have a group
### get globus group by station
- [ ] error if user not authorized
- [X] use environment variable if no station name
- [X] error if no station name given in arg or env var
- [X] gets group for a given station
what if station name doesn't match an existing station?
### get globus groups
- [ ] error if user not authorized
- [X] lists groups
### add globus group members
- [ ] error if user not authorized
- [X] error if no experiment name
- [X] error if given experiment name doesn't belong to an experiment
- [X] error if no members, managers, or admins given
- [X] if members listed, adds members to group
- [X] if managers listed, adds managers to group
- [X] if admins listed, adds admins to group
- [X] if members, managers, and admins listed, adds all members, managers, and admins to group
### delete globus group members
- [ ] error if user not authorized
- [X] error if no experiment name
- [X] error if given experiment name doesn't belong to an experiment
- [X] error if no members given
- [X] removes members listed from the group
does it matter if they are members managers or admins?
### delete globus group
- [ ] error if user not authorized
- [X] error if no experiment name
- [X] error if given experiment name doesn't belong to an experiment
- [X] error if group doesn't exist for experiment
- [X] deletes group
## Test Scenarios - Globus Group CLI
### add globus group members
- [ ] error if no experiment name
- [ ] error if no usernames
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment