GitHub - testing-farm/cli: Mirror of https://gitlab.com/testing-farm/cli
Table of Contents
Use cases
Currently the CLI supports:
-
submitting a test request
-
watch a request for completion
-
get a request completion report
Installation
Copr
The testing-farm cli is available as a RPM package in copr repository.
For released versions, enable the stable copr repository.
dnf copr enable @testing-farm/stableTo preview the latest changes merged to main branch, enable the latest copr repository.
dnf copr enable @testing-farm/latestOnly x86_64 buildroots exist, but the package itself is noarch, so when working on a non-x86_64 platform
please append eg. fedora-42-x86_64 to the dnf copr enable command.
Install testing-farm cli via dnf.
Container
You can run the tool using the official image via a small wrapper script.
curl -Lo ~/bin/testing-farm "https://gitlab.com/testing-farm/cli/-/raw/main/container/testing-farm" chmod +x ~/bin/testing-farm
In order to get the latest version of the tool, update the container simply using the following command:
Onboarding to Testing Farm
|
Note |
Required only if you will be submitting requests to Testing Farm. |
API Token Configuration
The CLI requires an API token for most operations. There are two ways to provide it:
Environment Variable
Set the TESTING_FARM_API_TOKEN environment variable:
export TESTING_FARM_API_TOKEN=<your-api-token>
System Keyring
Alternatively, you can store the token in your system keyring. The CLI will automatically retrieve it if the environment variable is not set.
|
Note |
System keyring is not available when running the CLI via the container wrapper. Use the environment variable method instead. |
To store the token in the keyring:
keyring set https://api.dev.testing-farm.io/v0.1 api-tokenUsage
Request new testing
The request command makes it easy to request testing on Testing Farm.
Just clone a repository with tmt tests and try it out. Most of the options will be autodetected:
|
Tip |
By default the execution will use List of composes for Public Ranch can be found here. |
See the --help for more options.
Watch an existing request
To watch an existing request for completion or get its completion status, use the watch command.
testing-farm watch --id <REQUEST_ID>
Disable colors
The colors can be disabled by setting the NO_COLOR environment variable.
See https://no-color.org/ for details.
NO_COLOR=1 testing-farm versionDevelopment
Tests
Testing of the project is currently done via:
-
pre-commit- for static analysis -
tmt- for functional and integration testing -
tox- for typing and (later) unit tests
To run all tests:
To run pre-commit/tmt/tox tests only:
make pre-commit make tmt make tox
|
Important |
|