GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - testing-farm/cli: Mirror of https://gitlab.com/testing-farm/cli

BranchesTags
Open more actions menu

Latest commit

 

History

319 Commits
319 Commits

Folders and files

NameName
Last commit message
Last commit date
.fmf
.fmf
 
 
container
container
 
 
plans
plans
 
 
src/tft/cli
src/tft/cli
 
 
tests
tests
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
.gitlab-ci.yml
.gitlab-ci.yml
 
 
.packit.yaml
.packit.yaml
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
.pyre_configuration
.pyre_configuration
 
 
LICENSE
LICENSE
 
 
LICENSE_SPDX
LICENSE_SPDX
 
 
Makefile
Makefile
 
 
README.adoc
README.adoc
 
 
catalog-info.yaml
catalog-info.yaml
 
 
poetry.lock
poetry.lock
 
 
pyproject.toml
pyproject.toml
 
 
testing-farm.spec
testing-farm.spec
 
 
tox.ini
tox.ini
 
 

Repository files navigation

Testing Farm CLI

Table of Contents
  • Use cases
  • Installation
    • Copr
    • Container
    • Pip
  • Onboarding to Testing Farm
    • API Token Configuration
  • Usage
    • Printing tool version
    • Request new testing
    • Watch an existing request
    • Disable colors
    • Separate stdout and stderr
  • Development
    • Install via Poetry
    • Tests

Testing Farm CLI tool.

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/stable

To preview the latest changes merged to main branch, enable the latest copr repository.

dnf copr enable @testing-farm/latest

Only 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.

dnf install testing-farm

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:

testing-farm update

Pip

You can local install the tool directly from PyPi.

pip install --user tft-cli

Onboarding to Testing Farm

Note

Required only if you will be submitting requests to Testing Farm.

Before using the CLI for submitting requests, you will need to onboard and get an API key.

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-token
Note

The URL should match the API endpoint you’re using. For the production Testing Farm, use https://api.dev.testing-farm.io/v0.1.

Usage

Printing tool version

testing-farm version

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:

testing-farm request
Tip

By default the execution will use container provisioner and the default tmt container - fedora. If you want to test on a VM, define it via --compose option.

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 version

Separate stdout and stderr

By default stderr and stdout streams are squashed as the container uses --tty option. To have separate streams you can set the NO_TTY variable. Please note that in this case the usual nice coloured formatting will be gone.

NO_TTY=1 testing-farm version

Development

Install via Poetry

If you want to develop testing-farm cli tool, install it via Poetry.

poetry install

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:

make test

To run pre-commit/tmt/tox tests only:

make pre-commit
make tmt
make tox
Important

tmt testing is running against a container image built from the repository checkout. When rerunning tmt tests only, make sure to make build if you have also cli code changes or updated the code, as they will not be picked up automatically.

About

Mirror of https://gitlab.com/testing-farm/cli

Resources

Readme
License
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.