Commit d6a73e3e authored by Marc Burnie [AWS]'s avatar Marc Burnie [AWS]
Browse files

updated README env variables and added OS support for Windows int testing

parent 1e7464df
......@@ -88,15 +88,10 @@ You will need to have the following environment variables defined.
| `AWS_SESSION_TOKEN` | `session-token-xxxxxxxxx` | AWS Session token needed if using an SSO user session to authenticate | yes |
| `AWS_COGNITO_USER_POOL_ID` | `us-east-1_xxxxxxxx` | User Pool Id for the reference cognito | no |
| `AWS_COGNITO_CLIENT_ID` | `xxxxxxxxxxxx` | Client ID for the Auth Flow integrated with the Cognito User Pool | no |
| `AWS_COGNITO_AUTH_FLOW` | `USER_PASSWORD_AUTH` | Auth flow used by reference cognito deployment | no |
| `AWS_COGNITO_AUTH_PARAMS_USER` | `int-test-user@testing.com` | Int Test Username | no |
| `AWS_COGNITO_AUTH_PARAMS_USER_NO_ACCESS` | `no-access-user@testing.com` | Int Test No Access Username | no |
| `AWS_COGNITO_AUTH_PARAMS_PASSWORD` | `some-secure-password` | Int Test User/NoAccessUser Password | yes |
| `HOST` | `http://localhost:8080` | The url where the CRS Catalog API is hosted | no |
| `PRIVATE_TENANT1` | `opendes` | Data Partition Id used by int tests | no |
| `PRIVATE_TENANT2` | `tenant2` | Data Partition Id used by int tests | no |
| `SHARED_TENANT` | `common` | Shared Data Partition Id used by int tests | no |
| `VENDOR` | `aws` | CSP running these tests | no |
| `ADMIN_USER` | `int-test-user@testing.com` | Int Test Username | no |
| `USER_NO_ACCESS` | `no-access-user@testing.com` | Int Test No Access Username | no |
| `ADMIN_PASSWORD` | `some-secure-password` | Int Test User/NoAccessUser Password | yes |
| `CRS_CATALOG_HOST` | `localhost:8080` | The url where the CRS Catalog API is hosted | no |
**Creating a new user to use for integration tests**
......
......@@ -14,26 +14,45 @@
#!/usr/bin/env bash
# Install venv for python3
which apt-get && sudo apt-get install -y python3 python3-pip python3-venv || echo "Not Ubuntu, skipping"
which yum && sudo yum install -y python3 python3-pip python3-venv || echo "Not RHEL, skipping"
python3 -m venv env
# sed -i 's/$1/${1:-}/' env/bin/activate # Fix deactivation bug '$1 unbound variable'
source env/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
# Run tests
echo ***RUNNING CRS Catalog API V2 TESTS***
python3 run_test_api_v2.py
V2_TEST_STATUS=$?
echo ***FINISHED CRS Catalog API V2 TESTS***
if [[ "$OSTYPE" == "msys" ]]; then
python -m pip install --upgrade pip
python -m pip install --user virtualenv
python -m venv env
source env/Scripts/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
# Run tests
echo ***RUNNING CRS Catalog API V2 TESTS***
python run_test_api_v2.py
V2_TEST_STATUS=$?
echo ***FINISHED CRS Catalog API V2 TESTS***
# python -m pip freeze > requirements.txt
python -m pip uninstall -r requirements.txt -y
else
# Install venv for python3
which apt-get && sudo apt-get install -y python3 python3-pip python3-venv || echo "Not Ubuntu, skipping"
which yum && sudo yum install -y python3 python3-pip python3-venv || echo "Not RHEL, skipping"
python3 -m venv env
# sed -i 's/$1/${1:-}/' env/bin/activate # Fix deactivation bug '$1 unbound variable'
source env/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
# Run tests
echo ***RUNNING CRS Catalog API V2 TESTS***
python3 run_test_api_v2.py
V2_TEST_STATUS=$?
echo ***FINISHED CRS Catalog API V2 TESTS***
# python3 -m pip freeze > requirements.txt
python3 -m pip uninstall -r requirements.txt -y
fi
# python3 -m pip freeze > requirements.txt
python3 -m pip uninstall -r requirements.txt -y
deactivate
rm -rf env/
......
Supports Markdown
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