Skip to content
Snippets Groups Projects
Commit 5e4e52c0 authored by hammonds's avatar hammonds
Browse files

Merge branch 'dev' into 'master'

Create test checklist for globus groups and workflows

See merge request !5
parents 8a6eb8c9 45aed14f
No related branches found
No related tags found
1 merge request!5Create test checklist for globus groups and workflows
......@@ -161,6 +161,29 @@ the list of users in the system. the --proposal-id and --esaf-id options on com
like dm-STATION\_NAME-upload and dm-create-experiment will add a list of users which
are defined in the esaf or proposal to the created experiment.
#### Managing Globus groups
There are commands available for managing a Globus group and the users of a Globus group.
The experiment for the group must be specified for each of the commands using the --experiment option.
`dm-create-globus-group --experiment=EXPERIMENTNAME`
This command will create a Globus group for the given experiment. There are options `--members`, `--managers`, `--admins` to list usernames of users that should be added to the group with a specific role
`dm-add-globus-group-members --experiment=EXPERIMENTNAME`
This command will add group members for the Globus group of the given experiment. There are options `--members`, `--managers`, `--admins` to list usernames of users that should be added to the group with a specific role. At least one of these options should be given.
`dm-delete-globus-group --experiment=EXPERIMENTNAME`
This command will delete the Globus group of the given experiment.
`dm-delete-globus-group-members --experiment=EXPERIMENTNAME --members=MEMBERS`
This command will remove users from the Globus group for the given experiment. At least one group member should be specified using the `--members` option.
`dm-get-globus-group`
This command lists information about a Globus group. The group can be specified by group id using the `--id` option or experiment name using the `--experiment` option.
`dm-list-globus-groups`
This command lists all known Globus groups. There is an option `--station` to list groups for a given station.
### dm-station-gui
......
# Data Management Globus Groups Test Guide
## Running the Test Suite
Be sure the services are running. Services live in
`data-management/etc/init.d`
To run the test cases:
```
source etc/dm.setup.sh
python data-management/test/python/dmtest/ds_web_service/api/test_globus_group_ds_api.py
```
## Coverage
To run with coverage:
```
python -m coverage run test_globus_group_ds_api.py
python -m coverage report
python -m coverage html #detailed html reports
```
Last run coverage:
/local/DataManagement/4.1.5/src/python/dm/ds_web_service/api/globusGroupDsApi.py 99%
## 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
- [ ] adds members to groups
### add user system role
- [ ] error if no user name
- [ ] error if no role name
- [ ] error if role name not `Administrator` or `Manager`
- [ ] error if no station name and role is `Administrator`
- [ ] error if station name and role is `Manager`
- [ ] assigns role to user
### create globus group
- [ ] creates globus group
- [ ] error if no experiment name
### delete globus group
- [ ] deletes globus group
- [ ] error if no experiment name
### delete globus group members
- [ ] error if no experiment name
- [ ] error if no usernames
- [ ] deletes members from a group
### delete user system role
- [ ] error if no user name
- [ ] error if no role name
- [ ] error if role name not `Administrator` or `Manager`
- [ ] error if no station name and role is `Administrator`
- [ ] error if station name and role is `Manager`
- [ ] deletes role from user
### get globus group
- [ ] gives information about globus group
- [ ] group can be found by experiment name or group id
- [ ] error if experiment name and group id are both missing
### list globus groups
- [ ] lists all globus groups for a station
- [ ] if station name not given, uses station from config manager
\ No newline at end of file
......@@ -36,7 +36,7 @@ Last run coverage: 48%
- [X] clicking `add experiment` button switches to `ESAF list` tab if ESAF list
- [X] clicking `add experiment` button switches to `experiment settings` tab if no ESAF list
- [X] clicking `use selected` button switches to `experiment settings` tab with experiment info filled in
- [ ] clicking `delete experiment` button opens `delete experiment` modal
- [X] clicking `delete experiment` button opens `delete experiment` modal
- [X] clicking `refresh` button, actually refreshes
- [X] `use selected` and `delete experiment` buttons disabled when no experiment selected
- [ ] clicking experiment changes row color to blue and enables `use selected` and `delete experiment` buttons
......@@ -46,39 +46,41 @@ Last run coverage: 48%
- [ ] shows list of ESAFs
- [ ] clicking esaf changes row color to blue
- [ ] double clicking esaf opens `experiment settings` tab with users populated
- [ ] `show details` and `use esaf` buttons disabled if no esaf is selected
- [ ] clicking `continue manually` button opens `experiment settings` tab with no users populated
- [X] `show details` and `use esaf` buttons disabled if no esaf is selected
- [X] clicking `continue manually` button opens `experiment settings` tab with no users populated if no beamline managers
- [ ] clicking `continue manually` button opens `experiment settings` tab with only beamline managers populated if there are beamline managers
- [ ] `current year` selection box has years for all experiment and filters list by year
- [ ] clicking `show details` button ?
- [ ] clicking `use esaf` button opens `experiment settings` tab with users populated
- [ ] clicking `use gup db` button changes list to be populated with gups, `use esaf` button to `use gup` button, and year filter option to run filter option.
### Experiment Settings tab
- [ ] clicking `back` button return to `experiment list` tab
- [ ] clicking `file collection stats` button error pop up if not saved
- [ ] clicking `file collection stats`opens `file collection stats` modal
- [ ] clicking `back` button returns to `experiment list` tab if not using ESAFs
- [ ] clicking `back` button returns to `esaf list` tab if using ESAFs
- [X] `file collection stats` and `view files` buttons disabled if not saved
- [X] clicking `file collection stats` opens `file collection stats` modal
- [ ] clicking `view files` opens `files list` tab
- [ ] can enter name, description, storage root path, additional params
- [ ] able to set date by typing or clicking calendar
- [ ] clicking calendar button opens calendar
- [ ] clicking date on calendar closes calendar
- [ ] choosing an end date which is before the start date opens error pop up and sets end date equal to start date
- [ ] choosing a start date which is after the end date opens error pop up and sets start date equal to end date
- [ ] `type` is populated with experiment types and able to select from drop down
- [ ] default experiment type is correct
- [ ] clicking `save` button will save experiment
- [ ] clicking `save` button with no name opens error pop up
- [ ] clicking `save` button opens save experiment modal
- [ ] clicking `save` button with no changes opens error pop up
- [X] default experiment type is correct
- [X] `save` button disabled if no experiment name
- [X] user cannot enter invalid characters in name field
- [X] changing name, description, storage root path, type, or date of existing experiment enables the `save` button, otherwise disabled
- [X] clicking `save` button opens save experiment modal for existing experiment
- [ ] clicking `save` button saves new experiment
- [ ] clicking `save` button opens error pop up for name or path changes if daq or upload in progress
- [ ] clicking `modify users` button opens `modify users` tab
- [ ] clicking `browse` button opens file system view
- [X] clicking `modify users` button opens `modify users` tab
- [X] clicking `browse` button opens file system view
- [ ] typing in experiment file path shows drop down for `experiment file path`
- [ ] `start daq`, `start upload`, and wrench buttons are disabled if data directory is empty
- [X] `start daq`, `start upload`, and wrench buttons are disabled if data directory is empty
- [ ] clicking `start daq` button creates, runs new daq with values set in daq system params modal and additional params and switch to `daqs list` tab
- [ ] clicking `start upload` button creates, runs new upload with values set in upload params modal and additional params and switch to `uploads list` tab
- [ ] daq wrench opens daq parameter pop up
- [ ] upload wrench opens upload params
- [X] clicking daq wrench button opens daq parameter dialog
- [X] clicking upload wrench button opens upload parameter dialog
- [ ] users list is by default populated with the station managers
- [ ] modifying the storage root path and clicking the `save` button moves the already collected data to the new path and removes it from the old location
......@@ -247,7 +249,7 @@ Last run coverage: 48%
### DM Unexpected Error modal
- [ ] clicking `show details` button shows the error message
- [ ] clicking `quit` button exits the gui
- [ ] clicking `notify admin` button sends error report to dm-admin email (probably only test manually)
- [X] clicking `notify admin` button sends error report to dm-admin email (test manually)
### Integrations
UI robust to connection failures with:
......
# Data Management Workflows Test Guide
## Running the Test Suite
Be sure the services are running. Services live in
`data-management/etc/init.d`
To run the test cases:
```
source etc/dm.setup.sh
cd data-management/src/python/dm/aps_beamline_tools/gui #TODO
python dmWorkflowsTest.py
```
## Coverage
To run with coverage:
```
python -m coverage run dmWorkflowsTest.py
python -m coverage report
python -m coverage html #detailed html reports
```
Last run coverage: 0%
## Test Scenarios
### add workflow
- [ ] add a workflow using pyspec
- [ ] add a workflow using json
- [ ] error message if add a workflow without file specified
### delete
- [ ] error message if delete without owner
- [ ] error message if delete without workflow name
- [ ] removes workflow
- [ ] error if workflow doesn't exist
### get processing job
- [ ] error message if no owner
- [ ] error message if no job id
- [ ] if stage given, gives details for that stage
- [ ] error if stage given but job does not have that stage
- [ ] error if job doesn't exist
### get workflow
- [ ] error if no owner
- [ ] error if no workflow name
- [ ] gives details for workflow
- [ ] error if workflow doesn't exist
### list jobs
- [ ] lists jobs
- [ ] if no owner, uses session login name
- [ ] error if no owner or session login
- [ ] if skip option given, that many jobs are skipped
- [ ] if limit is given, only that many jobs listed
- [ ] if no limit given, only default limit of jobs listed
- [ ] if display spec given, formatted according to that spec
- [ ] if metadata key/val pair given, only list jobs that match
### list workflows
- [ ] lists all workflows for owner
- [ ] if no owner, uses session login name
- [ ] error if no owner or session login
- [ ] if metadata key/val pair given, only list workflows that match
### process files
- [ ] error if no workflow owner or session login
- [ ] if no owner, uses session login name
- [ ] error if no name
- [ ] error if no directory
- [ ] error if no file path pattern
- [ ] if max active jobs option, don't run more than that number of jobs
- [ ] if no max active jobs option, don't run more than the default number of jobs
- [ ] processes files according to the workflow
- [ ] given key/value pairs used as workflow inputs
### start processing job
- [ ] starts processing job according to the workflow
- [ ] error if no workflow owner or session login
- [ ] if no owner, uses session login name
- [ ] error if no workflow name
- [ ] given key/value pairs used as workflow inputs
### stop processing job
- [ ] stops processing job
- [ ] error if no owner or session login
- [ ] if no owner, uses session login name
- [ ] error if no job id
### update workflow
- [ ] update a workflow using pyspec
- [ ] update a workflow using json
- [ ] error message if add a workflow without file specified
how does it know which to update?
What if it doesn't exist already?
### upsert workflow
- [ ] workflow using pyspec
- [ ] workflow using json
- [ ] error message if add a workflow without file specified
- [ ] updates workflow if already existing
- [ ] adds workflow if new
how does it know which to update?
### workflow options
- [ ] error if not dictionary format
- [ ] error if missing required keys name, owner, stages
what if id specified that wasn't assinged by db?
#### workflow stages
- [ ] stages executed in sorted order
- [ ] commands can use variables
- [ ] `workingDir` sets the working directory of a command
- [ ] default parallel execution if iterating over files via the $`filePath` variable
- [ ] setting `parallelExec` to false means no parallel execution
- [ ] setting `parallelExec` does nothing if not iterating over files via the $`filePath` variable
- [ ] if `outputVariableRegexList` then output variables match the regex patterns listed
what if they don't match?
- [ ] if `runIf` used, command only runs when `runIf` condition is met
- [ ] if `repeatPeriod`, `repeatUntil`, `maxRepeats` used, all 3 must be specified
- [ ] stage command repeats after `repeatPeriod` seconds
- [ ] stage command repeats until `repeatUntil` condition is met
- [ ] stage fails if command is repeated `maxRepeats` times
what happens if a stage fails?
- [ ] cannot use `workflow` reserved key in stage definition
- [ ] can use reserved keys id stage status owner startTime startTimestamp endTime endTimeStamp runTime errorMessage maxActiveJobs nActiveJobs nFiles nProcessedFiles nFailedFiles nSkippedFiles nAbortedFiles nCompletedFiles processedFiles failedFiles skippedFiles abortedFiles filePath filePathList filePathPattern fileQueryDict (not yet implemented) dataDir
- [ ] any user defined variables can be used
- [ ] output variables can be used as input variables
what happens if you define a reserved key with a value in your input keys?
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment