API testing for BC Data Catalog
Project description
Automated BCDC API Testing
Intention is to test the CKAN API after deployment.
Current tests include:
- verification of preconfigured orgs required for testing
- CRUD tests for packages.
OC Build
how to create new build without starting
oc create -f https://raw.githubusercontent.com/bcgov/bcdc-test/dev/k8s/bcdc-test-buildconfig.yaml
start build after created or start future incremental builds.
oc start-build bcdc-test -n databcdc
OC Job
each environment will have its own defined .yaml file within the k8s dir.
- test-dwelf-job-template.yaml
- test-toyger-job-template.yaml
- test-puma-job-template.yaml
how to run job from yaml as template, so we can change the name using a generated value appended to name
- CADI
oc process -f https://raw.githubusercontent.com/bcgov/bcdc-test/dev/k8s/test-dwelf-job-template.yaml | oc create -f -
- CATI
oc process -f https://raw.githubusercontent.com/bcgov/bcdc-test/dev/k8s/test-toyger-job-template.yaml | oc create -f -
Run Tests locally
pip install bcdc_apitests
pytest --pyargs bcdc_apitests --junitxml=<xml report name.xml>
Packaging
Configure Dev Env and Running Tests
clone
git clone <repo>
virtualenv
python -m virtualenv ve_bcdctest
./ve_bcdctest/Scripts/activate
python -m pip install -r requirements.txt
- make SRC dir part of python path
export PYTHONPATH=./src
set PYTHONPATH=./src
configure secrets
set the following env vars:
BCDC_API_KEY = <api key>
BCDC_URL = <URL>
run tests
cd src
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bcdc_apitests_dev-0.2.31.tar.gz.
File metadata
- Download URL: bcdc_apitests_dev-0.2.31.tar.gz
- Upload date:
- Size: 41.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c607261b157cc9bd37a85ba6a57301f1617d7a6590a0cc3e96baa601b2fa19f
|
|
| MD5 |
9ebbe9aca181ff6a2ea9f79b122dec67
|
|
| BLAKE2b-256 |
92e57ce35ed6cf52ae3e53fb6b91951bd2b9d94f2a890b5c4c0203b35dacf0aa
|
File details
Details for the file bcdc_apitests_dev-0.2.31-py3-none-any.whl.
File metadata
- Download URL: bcdc_apitests_dev-0.2.31-py3-none-any.whl
- Upload date:
- Size: 63.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1963462ce1a0ac9d918cfc039d1ab62d2c7b7be61c42c249c2fa78177b29fd4d
|
|
| MD5 |
e6341acfc71997ee06eb970257c3bf59
|
|
| BLAKE2b-256 |
8988b539a4bafc344bd39f402333f82706a955a0f9c8f816bf3978764afbcb0f
|