| Tests | NVIDIA | Lint |
|---|---|---|
| RH-based | Debian-based | Others |
|---|---|---|
Those community maintained images end up in the images: remote.
To run the tests locally, it's ideal to run them in a shortlived VM. The simplest way is to create a lxd-ci profile that you then use when creating the shortlived VM.
For convenience, a special profile (lxd-ci) can be used to run tests in local VMs. To define that profile:
# this needs to be run from inside the git repostory
GIT_ROOT="$(git rev-parse --show-toplevel)"
# create or edit the profile based on the provided template
lxc profile list | grep -qwF lxd-ci || lxc profile create lxd-ci
sed "s|@@PATH_TO_LXD_CI_GIT@@|${GIT_ROOT}|" "${GIT_ROOT}/lxd-ci.yaml" | lxc profile edit lxd-ciThen it's easy to create a shortlived VM:
lxc launch ubuntu-minimal-daily:24.04 v1 --vm -p lxd-ci$ lxc shell v1
root@v1:~# cd lxd-ci/
root@v1:~/lxd-ci# ./bin/local-run tests/snapd latest/edgeTo run a test locally (directly where you invoke it), use the bin/local-run helper:
./bin/local-run tests/interception latest/edgeFor faster repeated runs, you might want to tell snap that it can purge the LXD snap
without taking any snapshot:
PURGE_LXD=1 ./bin/local-run tests/interception latest/edgeTo test a with the exising/already installed LXD snap, you can set the KEEP_LXD environment variable.
KEEP_LXD=1 ./bin/local-run tests/interception latest/edgeNote: if you need to run tests on temporary machines, Testflinger reservations might be useful.
To test a custom build of LXD, you can set the LXD_SIDELOAD_PATH environment variable.
This will be copied to /var/snap/lxd/common/lxd.debug and the daemon will be reloaded before the test run.
LXD_SIDELOAD_PATH=/tmp/lxd ./bin/local-run tests/interception latest/edgeTo also test a custom build of lxc, you can set the LXC_SIDELOAD_PATH environment variable.
This will be copied to /var/snap/lxd/common/lxc.debug and used by the tests.
LXC_SIDELOAD_PATH=/tmp/lxc ./bin/local-run tests/interception latest/edgeTo test a custom snap of LXD, you can set the LXD_SNAP_PATH environment variable.
LXD_SNAP_PATH=/tmp/lxd_0+git.89550582_amd64.snap ./bin/local-run tests/interception latest/edgeTo run tests/network-ovn against various OVN implementation:
# Using the deb package from the base Os
OVN_SOURCE=deb PURGE_LXD=1 ./bin/local-run tests/network-ovn latest/edge
# Use numbered releases of MicroOVN
OVN_SOURCE=22.03/edge PURGE_LXD=1 ./bin/local-run tests/network-ovn latest/edge
OVN_SOURCE=24.03/edge PURGE_LXD=1 ./bin/local-run tests/network-ovn latest/edge
# Using the `latest/edge` MicroOVN snap channel
PURGE_LXD=1 ./bin/local-run tests/network-ovn latest/edgeThe tests need to be run from PS6's LXD bastion lxd-bastion-ps6.internal. Once connected, the proper environment can be loaded with:
peThen to run all the tests on OpenStack VMs:
./tests/main-openstackOr to run individual tests (tests/pylxd against latest/edge):
# bin/openstack-run: <serie> <kernel> <test> <args>
./bin/openstack-run jammy default tests/pylxd latest/edgeTo run the VM storage tests on the Dell PowerFlex driver, provide the following environment variables:
POWERFLEX_POOL: Name of the PowerFlex storage poolPOWERFLEX_DOMAIN: Name of the PowerFlex domainPOWERFLEX_GATEWAY: Address of the PowerFlex HTTP gatewayPOWERFLEX_GATEWAY_VERIFY: Whether to verify the HTTP gateway's certificate. The default istrue.POWERFLEX_USER: Name of the PowerFlex userPOWERFLEX_PASSWORD: Password of the PowerFlex userPOWERFLEX_MODE: Operation mode for the consumption of storage volumes. The default isnvme.
Use a PowerFlex storage pool (POWERFLEX_POOL) which has zero-padding enabled.
Using non zero-padding enabled pools is not allowed.
To run the VM storage tests using Pure Storage driver, provide the following environment variables:
PURE_GATEWAY: Address of the Pure Storage HTTP gatewayPURE_GATEWAY_VERIFY: Whether to verify the HTTP gateway's certificate. The default istrue.PURE_API_KEY: Pure Storage API key.PURE_MODE: Operation mode for the consumption of storage volumes. The default isnvme.
To run the VM storage tests using HPE Alletra Storage driver, provide the following environment variables:
ALLETRA_WSAPI: Address of the HTTP WSAPI gatewayALLETRA_WSAPI_VERIFY: Whether to verify the HTTP WSAPI gateway's certificate. The default istrue.ALLETRA_USERNAME: Name of the userALLETRA_PASSWORD: Password of the userALLETRA_CPG: Common Provisioning Group (CPG) nameALLETRA_MODE: Operation mode for the consumption of storage volumes. The default isnvme.
The PS6 environment has inbound and outbound firewalling applied at the network edge. In order to access some external sites here are the firewall rules we added to firewall maintained by IS:
Some HTTP(S) destination also require going through a proxy maintained by IS, here are the proxy rules we added: