# 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 for BCDC-TEST
pulls package from https://pypi.org/project/bcdc-apitests/
new OC build triggered by github actions on commit to master branch
how to create new build from build config
```
oc create -f https://raw.githubusercontent.com/bcgov/bcdc-test/dev/k8s/bcdc-test-buildconfig.yaml
```
start build
```
oc start-build bcdc-test -n databcdc
```
# OC Jobs for BCDC-TEST
each environment will have its own defined .yaml file within the k8s dir.
* test-dwelf-job-template.yaml
* test-toyger-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 -
```
# OC Development Build for BCDC-TEST-DEV
pulls from https://pypi.org/project/bcdc-apitests-dev/
new OC build triggered by github actions on push to dev branch
```
oc create -f https://raw.githubusercontent.com/bcgov/bcdc-test/dev/k8s/bcdc-test-buildconfig-dev.yaml
```
# OC Developmnet Jobs for BCDC-TEST-DEV
* CADI
```
oc process -f https://raw.githubusercontent.com/bcgov/bcdc-test/dev/k8s/test-dwelf-job-template-dev.yaml | oc create -f -
```
* CATI
```
oc process -f https://raw.githubusercontent.com/bcgov/bcdc-test/dev/k8s/test-toyger-job-template-dev.yaml | oc create -f -
```
# Run Tests locally
```
pip install bcdc_apitests
pytest --pyargs bcdc_apitests --junitxml=<xml report name.xml>
```
# Packaging
### disable teardown
`--df` Include this switch if you want to disable teardown that deletes the test
data that gets generated by the test suite. The various options basically tell the
test suite not to delete a particular type of data that are generated by the tests.
Options include:
* *orgs*
* *groups*
* *packages*
* *resources*
* *users*
* *other*
* *ALL*
# Packaging
Packaging is currently configured to be built automatically by github actions when
a pull request on master has been successfully merged.
## packaging version numbers
When a new package is built it will automatically check what the last version
is in PYPI for the package and increment that number.
Example if the version in pypi is 7.3.45, the next time the github action triggers
it will be 7.3.46. If you want the change either the major or the minor number
set the number in packages __init__.py file, for example to increment the major
version number to 8.
```
...
version=8.0.0
...
```
没有合适的资源?快使用搜索试试~ 我知道了~
PyPI 官网下载 | bcdc-apitests-dev-1.0.10.tar.gz
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 66 浏览量
2022-01-09
11:21:40
上传
评论
收藏 67KB GZ 举报
温馨提示
共67个文件
py:46个
json:11个
txt:4个
资源来自pypi官网。 资源全名:bcdc-apitests-dev-1.0.10.tar.gz
资源推荐
资源详情
资源评论
收起资源包目录
bcdc-apitests-dev-1.0.10.tar.gz (67个子文件)
bcdc-apitests-dev-1.0.10
setup.cfg 38B
README.md 3KB
PKG-INFO 4KB
bcdc_apitests_dev.egg-info
dependency_links.txt 1B
PKG-INFO 4KB
SOURCES.txt 2KB
top_level.txt 14B
requires.txt 156B
MANIFEST.in 54B
setup.py 1KB
bcdc_apitests
conftest.py 4KB
fixtures
scheming.py 771B
load_data.py 6KB
users.py 7KB
setup_fixtures.py 3KB
arguements.py 2KB
config_fixture.py 3KB
dynamic_data.py 6KB
resources.py 6KB
load_config.py 9KB
__init__.py 0B
packages.py 14KB
orgs.py 12KB
groups.py 9KB
cached_data.py 1KB
ckan.py 962B
tests
other
conftest.py 349B
test_other.py 7KB
__init__.py 0B
groups
conftest.py 363B
test_groups.py 3KB
__init__.py 0B
resources
conftest.py 1KB
__init__.py 0B
test_resources.py 10KB
packages
conftest.py 230B
__init__.py 0B
test_packages.py 26KB
organizations
test_orgs.py 6KB
conftest.py 303B
__init__.py 56B
__init__.py 56B
users
conftest.py 349B
__init__.py 0B
test_users.py 2KB
test_data
resource.json 574B
pkgDataData-1.json 33KB
testParams.json 8KB
pkgDataGeo-1.json 19KB
pkgData.json 11KB
testParams_old.json 8KB
pkgData_min.json 1KB
ckan_core_schema.readme.md 1KB
data_schema.json 41KB
ownerOrg.json 530B
group.json 262B
ckan_core_schema.json 5KB
__init__.py 499B
config
testConfig.py 3KB
__init__.py 51B
helpers
bcdc_dynamic_data_population.py 34KB
read_test_config.py 9KB
read_user_config.py 1KB
bcdc_dataset_schema.py 16KB
test_bcdc_dynamic_data_population.py 7KB
__init__.py 0B
file_utils.py 1005B
共 67 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功