Plugin for pytest to test RHSM client tools: subscription-manager,
insights-client, and rhc.
- dynaconf
- requests
- toml
You can install it using pip from this git repository, i.e.
$ pip install git+https://github.com/RedHatInsights/pytest-client-tools@mainIt provides a set of fixtures for pytest, representing the various client tools
and some helper bits:
candlepin-- a locally deployed Candlepin from sources with test dataexternal_candlepin-- a remote Candlepin (requires a configuration pointing to it passed as--test-config)any_candlepin--external_candlepinif available, otherwisecandlepinsubman--subscription-managerinsights_client--insights-clientrhc--rhc
It also provides an autouse check_avcs fixture. When auditd and the required
audit tools are available, it checks each test's AVC window, saves one
selinux.log artifact when AVCs are present, and fails for unexpected denials.
AVC collection is disabled automatically when SELinux is disabled. Known exceptions are
maintained by consuming projects through the client_tools_avc_skips fixture.
Each fixture value is a list of {"fields": {...}} or {"regex": ...}
rules; without an override, no known AVCs are skipped. The plugin validates and
applies the rules supplied by the consuming project.
Distributed under the terms of the MIT_ license.