LogoLogo
WebsiteTechnical Discussions
Developer documentation
Developer documentation
  • Public Technical Documentation
    • device-management-service
      • main
        • actor
        • api
        • cmd
          • actor
          • cap
        • db
          • repositories
            • clover
        • dms
          • behaviors
          • jobs
          • node
          • onboarding
          • resources
        • docs
          • deployments
          • onboarding
          • private_network
        • executor
          • docker
          • firecracker
          • background_tasks
          • config
          • hardware
        • maint-scripts
        • network
          • libp2p
        • observability
        • specs
          • basic_controller
          • s3
          • volume
          • integration
        • tokenomics
        • types
        • utils
          • validate
      • release
        • actor
        • api
        • cmd
          • actor
          • cap
        • db
          • repositories
            • clover
        • dms
          • behaviors
          • hardware
          • jobs
          • node
          • onboarding
          • resources
        • docs
          • deployments
          • onboarding
          • private_network
        • executor
          • docker
          • firecracker
        • internal
          • background_tasks
          • config
        • maint-scripts
        • network
          • libp2p
        • observability
        • plugins
        • specs
        • storage
          • basic_controller
          • s3
          • volume
        • test
        • tokenomics
        • types
        • utils
          • validate
    • solutions
      • asi-node
        • main
          • demos
            • ocap_auth
              • ansible
              • videos
          • did-auth-use-scenarios
            • create-a-hosting-deployment
            • make-a-payment
            • manage-dids-and-ocaps
            • register-an-ai-agent
            • submit-a-compute-job
          • pilots
            • asi-create-authentication-poc
        • release
      • nunet-appliance
        • main
        • release
    • test-suite
      • main
        • cicd
          • tests
            • feature_environment
          • cli
          • dms-on-lxd
            • local
        • environments
          • development
          • feature
          • production
          • staging
        • infrastructure
          • cloud-init
          • dms-on-lxd
          • nginx
        • lib
        • stages
          • dependency_scanning
          • functional_tests
          • integration_tests
          • load_tests
          • regression_tests
          • security_tests_1
          • security_tests_2
          • security_tests_live
          • unit_tests
          • user_acceptance_tests
      • release
        • cicd
          • tests
            • feature_environment
          • cli
          • dms-on-lxd
            • local
        • environments
          • development
          • feature
          • production
          • staging
        • infrastructure
          • cloud-init
          • dms-on-lxd
          • nginx
        • lib
        • stages
          • dependency_scanning
          • functional_tests
          • integration_tests
          • load_tests
          • regression_tests
          • security_tests_1
          • security_tests_2
          • security_tests_live
          • unit_tests
          • user_acceptance_tests
    • team-processes-and-guidelines
      • main
        • best_practices
        • ci_cd_pipeline
        • community_feedback_process
        • contributing_guidelines
        • git_workflows
        • nunet_test_process_and_environments
        • secure_coding_guidelines
        • specification_and_documentation
        • team_process
          • a_project_management
          • b_ceremonies_artifacts
          • c_drum_buffer_rope
          • d_development_process
          • e_culture_rules
          • f_mr_review
        • vulnerability_management
          • devsecops_maturity_models
          • nunet_security_pipeline
          • secret_management
          • sop_security_mr_review
Powered by GitBook
On this page
  • CLI
  • Basic Usage
  • Customization via environment variables
  • LXD Infrastructure Management
  • Feature Environment
Export as PDF
  1. Public Technical Documentation
  2. test-suite
  3. release
  4. cicd

cli

Previousfeature_environmentNextdms-on-lxd

Last updated 10 hours ago

Last updated: 2025-05-15 01:09:53.778412 File source:

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.

./cli.sh <context> <action> [<subcommand>, ...] [additional arguments...]

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 file

  • environment 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

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 by DMS_SOURCE installed (default: 2)

If DMS_SOURCE is a web link:

  • DMS_ON_LXD_OVERWRITE_DEB: set to true to overwrite an existing deb file with the contents of DMS_SOURCE (default: false)

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 to false to run tests directly without Docker container (default: true)

  • BEHAVE_ENABLE_ALLURE: Set to true to enable Allure test reporting (default: true)

  • BEHAVE_ENABLE_JUNIT: Set to true to enable JUnit test reporting (default: true)

  • BEHAVE_VERBOSE_VALIDATION: Set to true to enable verbose validation of feature files, which displays among other things skipped steps (default: false)

LXD Infrastructure Management

While the following examples use inline environment variables, you are encouraged to use the .env file to customize these variables.

 Create LXD infrastructure
./cli.sh lxd create

 Destroy LXD infrastructure
./cli.sh lxd destroy

To specify a dms debian file:

DMS_SOURCE=/path/to/file ./cli.sh lxd create

To specify a download link for the dms debian file:

DMS_SOURCE=https://d.nunet.io/nunet-dms-amd64-latest.deb DMS_ON_LXD_OVERWRITE_DEB=true ./cli.sh lxd destroy

Feature Environment

 Validate gherkin feature files
./cli.sh validate feature-files

 Run standalone tests
./cli.sh run functional_tests standalone

 Run distributed tests with allure and junit
BEHAVE_ENABLE_JUNIT=true BEHAVE_ENABLE_ALLURE=true ./cli.sh run functional_tests distributed

 Serve allure reports
./cli.sh serve allure-report

 List available tests
./cli.sh run functional_tests list

 Run specific distributed tests
./cli.sh run functional_tests distributed $(./cli.sh run functional_tests list | grep deployment)

 Run specific standalone tests
./cli.sh run functional_tests standalone $(./cli.sh run functional_tests list | grep deployment)

See for detailed information on environment variables used to customize DMS on LXD execution.

See for detailed information on how to execute the feature environment locally.

link on GitLab
DMS on LXD Usage Guide
Feature Environment setup guide