broadinstitute/terra-featured-workspace-tests
This code is to test that Terra Featured Workspaces are working properly. It generates individual reports for each workspace, as well as a master report listing all the tested workspaces with links to their individual reports. The reports live in a google bucket and are publicly viewable.
Note: Currently this code tests all workflows within a Featured Workspace, but it does not test notebooks.
Prerequisites: You will need python3 and may need to install some packages if you don't have them already. After installing python3 and pip3, you can import packages needed to run these scripts using sudo pip3 install dataclasses firecloud tenacity
. Alternately, use a Docker instead.
To run a test of all Featured Workspaces (everything here), from the command line, run:
python3 featured_workspaces_test.py -v
-v
flag (for verbose) will print progressTo run a test on a single workspace, from the command line, run:
python3 workspace_test_report.py -v --original_name [name of workspace] --original_project [billing project]
For example:
python3 workspace_test_report.py -v --original_name Sequence-Format-Conversion --original_project help-gatk
Enter Docker image interactively:
docker run --rm -it -v "$HOME"/.config:/.config -v $PWD:/scripts broadinstitute/terra-featured-workspace-tests:latest
Then run test on all workspaces:
python3 scripts/featured_workspaces_test.py -v
Or, run it all in Docker:
docker run --rm -v "$HOME"/.config:/.config -v $PWD:/scripts broadinstitute/terra-featured-workspace-tests:latest python3 -u scripts/featured_workspaces_test.py -v
To delete workspaces, use cleanup_workspaces.py
.
--age_days x
(and to delete all workspaces, use --age_days -1
).--match_str [string to match]
For example, this line will delete all workspaces created in the 2019-10-23-17-48-44 test: python3 cleanup_workspaces.py --match_str 2019-10-23-17-48-44
Or using Docker: docker run --rm -v "$HOME"/.config:/.config -v $PWD:/scripts broadinstitute/terra-featured-workspace-tests:latest python3 -u scripts/cleanup_workspaces.py -v --match_str 2019-10-23-17-48-44
--gcs_path
flag, is gs://dsp-fieldeng/fw_reports/docker pull broadinstitute/terra-featured-workspace-tests