cli
Last updated: 2025-04-02 09:04:08.174101 File source: link on GitLab
CLI
The cli.sh
script provides a unified interface for managing various functionalities of
the test-suite.
Currently, the cli is only tested on linux, so please if you want to use it on MacOSx, you are encouraged to report incompatibilites with the underlying scripts that compose the cli.
Basic Usage
Note that all cli.sh
executions assume that your working directory is the test-suite
project root.
Running without arguments (./cli.sh
) will fail with a usage message.
Customization via environment variables
To customize the execution of the local environment, you should copy .default.env
to.env
and change the variable values as needed.
The order or precedence is:
command line defined environment variables (ex:
DMS_SOURCE=/path/to/deb ./cli.sh lxd create
)environment variables defined in
.env
fileenvironment variables defined in
.default.env
file
The following are some of the the environment variables available for customizing test execution via the CLI.
lxd create
lxd destroy
lxd create
lxd destroy
The most important variable is DMS_SOURCE
:
DMS_SOURCE
: path to a debian file, to a dms local clone or an https link (default:https://d.nunet.io/nunet-dms-amd64-stable.deb
)
The name is legacy when the project only accepted a debian package and has been overloaded to support links and folders, since it's relatively simple to distinguish these cases.
For the case which the variable points to debian package, it's used directly by dms-on-lxd to provision the virtual machines.
If it's an HTTPS link, the CLI attempts to download the debian package using curl
. There
is no support for authentication, since the intended usage is with the permalinks hosted
at d.nunet.io
. Use https://d.nunet.io/nunet-dms-amd64-stable.deb
for a stable release
from the release
branch of dms and https://d.nunet.io/nunet-dms-amd64-latest.deb
for
the latest release from the main
branch.
If it's a folder, the cli assumes a folder structure wheremaint-scripts/Dockerfile.build
and maint-scripts/build.sh
exist and will atempt to use
these files to build dms and then use the resulting debian package to provision the
environment.
DMS_ON_LXD_ENV
: name of the environment to create the virtual machines. Useful for deploying multiple separate environment with different versions of DMS (default:local
)DMS_ON_LXD_INSTANCES_COUNT
: number of instances to create with the debian package provided byDMS_SOURCE
installed (default:2
)
If DMS_SOURCE
is a web link:
DMS_ON_LXD_OVERWRITE_DEB
: set totrue
to overwrite an existing deb file with the contents ofDMS_SOURCE
(default:false
)
run {test_type}
run {test_type}
BEHAVE_STEP_TIMEOUT
: sets the timeout for each step when running gherking features in python-behave. (default:30
)DMS_ON_LXD_CONTAINERIZATION
: Set tofalse
to run tests directly without Docker container (default:true
)BEHAVE_ENABLE_ALLURE
: Set totrue
to enable Allure test reporting (default:true
)BEHAVE_ENABLE_JUNIT
: Set totrue
to enable JUnit test reporting (default:true
)BEHAVE_VERBOSE_VALIDATION
: Set totrue
to enable verbose validation of feature files, which displays among other things skipped steps (default:false
)
LXD Infrastructure Management
See DMS on LXD Usage Guide for detailed information on environment variables used to customize DMS on LXD execution.
See Feature Environment setup guide for detailed information on how to execute the feature environment locally.
While the following examples use inline environment variables, you are encouraged to use
the .env
file to customize these variables.
To specify a dms debian file:
To specify a download link for the dms debian file:
Feature Environment
Last updated