跳转到主要内容

TestFM是一个测试套件,用于测试foreman-maintain工具。

项目描述

https://api.travis-ci.org/SatelliteQE/testfm.svg?branch=master https://img.shields.io/pypi/pyversions/testfm.svg https://img.shields.io/pypi/l/testfm.svg https://img.shields.io/pypi/v/testfm.svg https://requires.io/github/SatelliteQE/testfm/requirements.svg?branch=master

TestFM 是一个基于 pytest-ansible 的测试套件,用于测试 Foreman 维护工具

快速入门

以下仅是 TestFM 的简要设置指南。运行测试的部分提供了更全面的 TestFM 使用指南。

TestFM 需要测试服务器的 SSH 访问权限,并且这种 SSH 访问是通过 pytest-ansible 实现的。

获取源代码并安装依赖项

git clone https://github.com/SatelliteQE/testfm.git
pip3 install -r requirements.txt

就是这样!现在您可以开始测试 Foreman Maintain 了。但是,在继续之前,您还需要做一些其他事情

  • 确保 ssh-key 已复制到测试系统。

  • 确保 foreman maintain 已安装在 foreman/satellite 服务器上。

运行测试

在运行任何测试之前,您必须将 foreman 或 satellite 主机名添加到 testfm/inventory 文件中(首先将其从 `testfm/inventory.sample` 复制过来)。

完成以上操作后,您可以使用 pytest 运行测试

pytest --ansible-host-pattern satellite --ansible-user=root  --ansible-inventory testfm/inventory
tests/

您可以运行测试的特定子集

pytest --ansible-host-pattern satellite --ansible-user=root --ansible-inventory testfm/inventory
tests/test_case.py

pytest --ansible-host-pattern satellite --ansible-user=root  --ansible-inventory testfm/inventory
tests/test_case.py::test_case_name

想要贡献吗?

感谢您考虑为 TestFM 贡献!如果您有任何问题或疑虑,请随时与团队联系。

许可

TestFM 根据 GNU 通用公共许可证 v3.0 许可。

项目详情


下载文件

下载适用于您的平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源代码分发

testfm-0.1.4.tar.gz (12.5 kB 查看哈希值)

上传时间 源代码

构建分发

testfm-0.1.4-py3-none-any.whl (31.1 kB 查看哈希值)

上传时间 Python 3

支持