Skip to main content

TestFM is a test suite which exercises foreman-maintain tool.

Project description

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 is a test suite based on pytest-ansible that exercises The Foreman maintenance tool

Quickstart

The following is only a brief setup guide for TestFM. The section on Running the Tests provides a more comprehensive guide to using TestFM.

TestFM requires SSH access to the server system under test, and this SSH access is implemented by pytest-ansible.

Get the source code and install dependencies:

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

That’s it! You can now go ahead and start testing The Foreman Maintain. However, there are a few other things you need to do before continuing:

  • Make sure ssh-key is copied to the test system.

  • Make sure foreman maintain is installed on foreman/satellite server.

Running the Tests

Before running any tests, you must add foreman or satellite hostname to the testfm/inventory file (first copy it from`testfm/inventory.sample`).

That done, you can run tests using pytest

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

It is possible to run a specific subset of 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

Want to contribute?

Thank you for considering contributing to TestFM! If you have any question or concerns, feel free to reach out to the team.

Licensing

TestFM is licensed under GNU General Public License v3.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

testfm-0.1.4.tar.gz (12.5 kB view hashes)

Uploaded Source

Built Distribution

testfm-0.1.4-py3-none-any.whl (31.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page