Skip to content

853 epic review of ezid api test coverage #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ templates/info/
*\.egg-info/
\.pytest_cache/
.eggs/
venv/
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11.10
1 change: 1 addition & 0 deletions scripts/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11.10
48 changes: 48 additions & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Running scripts in this directory

## Prerequisites

- You need a version of Python installed, currently the latest version of 3.11 works fine
and is the same version that the EZID app uses. The version installed on the servers
is probably fine for using the verify_ezid_status.py script but perhaps not some other scripts.
- If you need a version locally, you can use [pyenv](https://github.com/pyenv/pyenv) and
install by using the instructions at the pyenv link or `brew install pyenv`.


```bash
# install the version of python you desire
pyenv install 3.11.10

# set the version of python to use
pyenv local 3.11.10

# create a virtual environment
python -m venv venv

# activate the virtual environment
source venv/bin/activate

# install the requirements
pip install -r requirements.txt
```

if coming back later, activate your python version and virtual environment
```bash
pyenv local 3.11.10
source venv/bin/activate
```

## Running the verify_ezid_status.py script

Use a line like the following (substituting your own values) to run the script and test the api.

```bash
# Run the test normally with download check and email to user, environments are test/dev/stg/prod
python verify_ezid_status.py -e <env> -u <user> -p <password> -n <email>

# in some environments dev/test it may be convenient to skip the download check because the daemon is not running
# the -s or --skip_download_check flag will skip the download check
python verify_ezid_status.py -e <env> -u <user> -p <password> -s
```

All tests should pass with an `ok` message if the api is working.
1 change: 1 addition & 0 deletions scripts/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
requests~=2.31.0
selenium~=4.20.0
shortuuid~=1.0.13
335 changes: 0 additions & 335 deletions scripts/verify_ezid_after_patching.py

This file was deleted.

Loading