Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 26 additions & 37 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ tests/
utils/ # Utilities for testing
```

## Testing example for Perlmutter
## Testing examples

### Machine Independent

```bash
rm -rf build
Expand All @@ -29,9 +31,19 @@ pytest tests/unit/test_*.py
python -m unittest tests/integration/python_tests/group_by_command/test_*.py
# Ran 69 tests in 327.570s
# OK
# NOTE: Some tests will be skipped on systems without hsi/HPSS access
python -m unittest tests/integration/python_tests/group_by_workflow/test_*.py
# Ran 4 tests in 2.666s
# OK

cd tests/integration/bash_tests/run_from_any/
# Review the directions at the bottom of globus_auth.bash
# Run `./globus_auth.bash` with the appropriate parameters.
```

### Perlmutter-specific

```bash
cd tests/integration/bash_tests/run_from_perlmutter/
time ./follow_symlinks.sh # NOTE: you will have to change out paths for your username
# real 0m31.851s
Expand All @@ -42,52 +54,29 @@ time ./test_update_non_empty_hpss.bash

# Log into globus.org
# Log into endpoints (NERSC Perlmutter, Globus Tutorial Collection 1) at globus.org: File Manager > Add the endpoints in the "Collection" fields
time ./test_ls_globus.bash
# real 0m26.930s
time ./test_ls_globus.bash # NOTE: You may be asked to paste an auth-code
# real 0m40.297s
# No errors
```

## Testing example for Chrysalis
### Chrysalis-specific

```bash
rm -rf build
conda clean --all --y
conda env create -f conda/dev.yml -n zstash_dev_20251017_test1
conda activate zstash_dev_20251017_test1
pre-commit run --all-files
python -m pip install .
pytest tests/unit/test_*.py
# 1 passed in 0.84s
python -m unittest tests/integration/python_tests/group_by_command/test_*.py
# Ran 69 tests in 110.139s
# OK (skipped=32)
# NOTE: Some tests are skipped because Chrysalis doesn't have direct `hsi`/HPSS access
python -m unittest tests/integration/python_tests/group_by_workflow/test_*.py
# Ran 4 tests in 6.889s
# OK
cd tests/integration/bash_tests/run_from_chrysalis/

# Log into globus.org
# 1. Log into endpoints (LCRC Improv DTN, NERSC Perlmutter) at globus.org: File Manager > Add the endpoints in the "Collection" fields
# 2. To start fresh, with no consents: https://auth.globus.org/v2/web/consents > Manage Your Consents > Globus Endpoint Performance Monitoring > rescind all"
# Then, increment `try_num` below to avoid using an old directory.
# Alternatively, start fresh by deleting the directory on Perlmutter:
# `rm -rf /global/homes/f/forsyth/zstash/tests/test_globus_auth_try{try_num}`
time ./globus_auth.bash try_num # NOTE: you will have to change out paths for your username
# Paste the URL into your browser
# Log into Argonne
# Log into NERSC
# Provide a label
# Copy the auth code to the command line
#
# real 2m45.954s
# No errors

# If not done above, do the following:
# Log into globus.org
# Log into endpoints (LCRC Improv DTN, NERSC Perlmutter) at globus.org: File Manager > Add the endpoints in the "Collection" fields

# In all cases, do:
# Reset completely:
# Revoke consents: https://auth.globus.org/v2/web/consents > Globus Endpoint Performance Monitoring > rescind all
# Run the following lines to set up the database_corruption test
# Alternative option: Rerun the `test_single_auth_code ${path_to_repo} NERSC_PERLMUTTER_ENDPOINT ${perlmutter_dst_dir}` line from `globus_auth.bash`
rm ~/.zstash_globus_tokens.json
mkdir zstash_demo; echo 'file0 stuff' > zstash_demo/file0.txt
# NERSC_PERLMUTTER_ENDPOINT=6bdc7956-fc0f-4ad2-989c-7aa5ee643a79
zstash create --hpss=globus://6bdc7956-fc0f-4ad2-989c-7aa5ee643a79//global/homes/f/forsyth/zstash/tests/test_database_corruption_setup23 zstash_demo
# You'll have to paste an auth code here, but NOT during the database_corruption test.
rm -rf zstash_demo/
# Then, increment `try_num` below to avoid using an old directory.
# Alternatively, start fresh by deleting the directory on Perlmutter:
# `rm -rf /global/homes/f/forsyth/zstash/tests/test_database_corruption_try{try_num}`
Expand Down
Loading
Loading