# 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
...
```
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
bcdc-apitests-1.0.0.tar.gz (68个子文件)
bcdc-apitests-1.0.0
setup.cfg 38B
README.md 3KB
PKG-INFO 4KB
MANIFEST.in 54B
setup.py 1KB
bcdc_apitests.egg-info
dependency_links.txt 1B
PKG-INFO 4KB
SOURCES.txt 2KB
top_level.txt 14B
requires.txt 156B
bcdc_apitests
conftest.py 4KB
pytest-run.py 3KB
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
共 68 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- (完整)数据库课程设计餐厅点餐说明书-21ab6d3c8beb172ded630b1c59eef8c75ebf952c.doc
- 2023-04-06-项目笔记 - 第一百五十四阶段 - 4.4.2.152全局变量的作用域-152 -2024.06.04
- 松哥解协议松哥解协议松哥解协议松哥解协议松哥解协议
- 618节日618节日618节日
- tensorflow-gpu-2.9.1-cp37-cp37m-win-amd64.whl
- tensorflow-gpu-2.9.0-cp37-cp37m-win-amd64.whl
- tensorflow-gpu-2.9.0-cp39-cp39-win-amd64.whl
- lcd daimalcd daima
- 电影领域-推荐算法-个性化内容-观影决策-电影推荐小程序.zip
- 电气控制PLC考试题库
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功