# kubetest
[![Build Status](https://build.vio.sh/buildStatus/icon?job=vapor-ware/kubetest/master)](https://build.vio.sh/blue/organizations/jenkins/vapor-ware%2Fkubetest/activity)
[![PyPI](https://img.shields.io/pypi/v/kubetest.svg)](https://pypi.org/project/kubetest/)
[![Documentation Status](https://readthedocs.org/projects/kubetest/badge/?version=latest)](https://kubetest.readthedocs.io/en/latest/?badge=latest)
Kubetest is a [pytest][pytest] plugin that makes it easier to manage a Kubernetes
cluster within your integration tests. While you can use the [Kubernetes Python client][k8s-py]
directly, this plugin provides some cluster and object management on top of that so you can
spend less time setting up and tearing down tests and more time actually writing your tests.
In particular, this plugin is useful for testing your Kubernetes infrastructure (e.g., ensure
it deploys and behaves correctly) and for testing disaster recovery scenarios (e.g. delete a
pod or deployment and inspect the aftermath).
**Features:**
* Simple API for common cluster interactions.
* Uses the Kubernetes Python client as the backend, so more complex custom
actions are possible.
* Load Kubernetes manifest YAMLs into their Kubernetes models.
* Each test is run in its own namespace and the namespace is created and
deleted automatically.
* Detailed logging to help debug error cases.
* Wait functions for object readiness and for object deletion.
* Get container logs and search for expected logging output.
* Plugin-managed RBAC permissions at test-case granularity using pytest markers.
For more information, see the [kubetest documentation][kubetest-docs].
## Installation
This plugin can be installed with `pip`
```
pip install kubetest
```
Note that the `kubetest` package has entrypoint hooks defined in its [`setup.py`](setup.py)
which allow it to be automatically made available to pytest. This means that it will run
whenever pytest is run. Since `kubetest` expects a cluster to be set up and to be given
configuration for that cluster, pytest will fail if those are not present. It is therefore
recommended to only install `kubetest` in a virtual environment or other managed environment,
such as a CI pipeline, where you can assure that cluster access and configuration are
available.
## Documentation
See the [kubetest documentation page][kubetest-docs] for details on command line usage,
available fixtures and markers, and general pytest integration.
## Feedback
Feedback for kubetest is greatly appreciated! If you experience any issues, find the
documentation unclear, have feature requests, or just have questions about it, we'd
love to know. Feel free to open an issue for any feedback you may have.
## License
kubetest is released under the [GPL-3.0](LICENSE) license.
[pytest]: https://docs.pytest.org/en/latest/
[k8s-py]: https://github.com/kubernetes-client/python
[kubetest-docs]: https://kubetest.readthedocs.io/en/latest/
PyPI 官网下载 | kubetest-0.9.3.tar.gz
版权申诉
91 浏览量
2022-01-28
06:20:14
上传
评论
收藏 53KB GZ 举报
![avatar](https://profile-avatar.csdnimg.cn/277f6345dca0446498fbbc03843436aa_qq_38161040.jpg!1)
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
最新资源
- VC++6.0精简安装版或VC++6.0简化安装程序
- 发现概率与信噪比的关系曲线
- 动态网页图形验证码识别源代码
- VeriSign通用根证书认证机构证书文件(.cer)
- “迅雷下载快车补丁” 可能指的是一份专门为迅雷下载快车软件设计的修复文件,用于优化和修复软件功能
- 【ds18b20 library for stm32 hal】ds18b20-master
- “EasyUI讲义李炎恢” 可能指的是一份关于EasyUI框架的教学资料,由李炎恢编撰,适用于希望学习EasyUI使用和开发的读
- 相机标定:机器视觉领域的关键技术探析.pdf
- “SerialAide-Release.zip是一个压缩文件,可能包含了Serial Aide软件的发布版本 ”
- 基于vue实现购物车项目+源码+高分项目.7z
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)