Live tests
A live test runs a sensor or a protocol client against a real server: a Windows machine, a mail server, a router, a database. The servers belong to whoever runs the tests, so a live test learns where its target is from environment variables. Addresses, names, user names and passwords of a lab never go into the repository.
The convention
- A variable is named
PROBEWARD_TEST_<AREA>_<WHAT>. One area is one lab target:WINRMis a Windows machine,MAILis a mail server,NETEMis the impaired network, and so on.WHATisHOST,USER,PASSWORD,NAME(the name the target's certificate carries),PIN(a certificate fingerprint) or something the area needs. - Passwords and secrets are only ever in the environment. Give a variable the contents of a file with
export PROBEWARD_TEST_MAIL_PASSWORD="$(cat /path/to/file)", so that the secret is not copied into a script that is kept. - Examples in this page use the documentation range
192.0.2.0/24and the domainexample.org.
When variables are not set
A live test whose variables are not all set does not fail. It prints one line that names the missing variables and returns, so it counts as passed:
mail_failures: PROBEWARD_TEST_MAIL_HOST/USER/PASSWORD not set, live test not runCargo hides the output of a passing test, so add -- --nocapture to see these lines. A test that prints nothing and returns, or one that panics because a variable is missing, is a bug.
Two kinds of test are not in this rule:
- A variable that only widens a test is optional, and the test does what it can without it.
- The daemon tests (see Local daemons) run real programs on this machine. A missing program fails the test and says what to install, unless
PROBEWARD_SKIP_DAEMON_TESTS=1asks for a skip.
Running a group
Set the area's variables, then run the test file that reads them. A name after -- filters the tests:
export PROBEWARD_TEST_MAIL_HOST=192.0.2.30 PROBEWARD_TEST_MAIL_NAME=mail.example.org # and the rest of the area
cargo test -p probeward-sensors --test mail_ftp_live -- --nocapture
cargo test -p probeward-sensors --test live_protocols ldap -- --nocapture # only the tests with "ldap" in the nameA person with a lab keeps all its variables in one shell file outside the repository, with mode 600, and sources it: . ~/lab/live-tests.env. Everything in the tables below that the lab has can then run in one go with cargo test -p probeward-sensors, and the groups it lacks print their one line and return.
Windows (WINRM, KRB, WMI, AD, WIN)
Read by crates/probeward-sensors/tests/winrm_live.rs, except where the last column says otherwise.
| Variable | Meaning | Needed | Default |
|---|---|---|---|
PROBEWARD_TEST_WINRM_HOST | Address of the machine, optionally with :port | Required | Port 5985 |
PROBEWARD_TEST_WINRM_USER | Account: user, or DOMAIN\user | Required | |
PROBEWARD_TEST_WINRM_PASSWORD | Its password | Required | |
PROBEWARD_TEST_WINRM_ROLES | Comma-separated server roles the machine has: iis, sql, ad. The tests of a role run only when it is listed | Optional | None, so those tests print a line and return |
PROBEWARD_TEST_AD_EXPECT | healthy or broken: the state the domain's replication is in | Optional | The replication test only checks the shape of the answer |
PROBEWARD_TEST_WIN_FILE_DIR | A prepared folder on the machine, for the win_file test (see the page of the sensor) | Optional | The test prints a line and returns |
PROBEWARD_TEST_WINRM_REALM | The Active Directory domain's DNS name. With _HOSTNAME, the whole suite logs in with Kerberos instead of Negotiate. Setting only one of the two panics | Optional | Negotiate |
PROBEWARD_TEST_WINRM_HOSTNAME | The machine's full DNS name, which names its service principal | Optional, with _REALM | |
PROBEWARD_TEST_WINRM_KDC | A domain controller's address, when DNS cannot find one | Optional | Found through DNS |
PROBEWARD_TEST_WQL | A WQL query for record_raw, which prints the decrypted responses to it for making fixtures | Optional | Nothing is recorded |
PROBEWARD_TEST_NS | The namespace for that query | Optional | root/cimv2 |
Also read, in crates/probeward-sensors/src/proto/winrm/mod.rs: PROBEWARD_TEST_WINRM_HOST, _USER and _PASSWORD, for one test that needs the session's insides.
Kerberos against a domain controller, read by the unit tests in crates/probeward-sensors/src/proto/winrm/kerberos/tests.rs (run with cargo test -p probeward-sensors --lib kerberos -- --nocapture):
| Variable | Meaning | Needed | Default |
|---|---|---|---|
PROBEWARD_TEST_KRB_KDC | The controller's address, with or without a port | Required | |
PROBEWARD_TEST_KRB_WSMAN | Its WinRM address:port | Required | |
PROBEWARD_TEST_KRB_PASSWORD | The account's password | Required | |
PROBEWARD_TEST_KRB_REALM | The realm, for example CORP.EXAMPLE. Setting it selects the domain controller tests and turns the MIT lab tests off | Required for the dc_ tests | |
PROBEWARD_TEST_KRB_USER | The account name without the realm | Required for the dc_ tests | |
PROBEWARD_TEST_KRB_HOST | The controller's DNS name, which the service principal is made from. It need not resolve here | Required for the dc_ tests |
Without _REALM the same _KDC, _WSMAN and _PASSWORD point at the MIT Kerberos lab that crates/probeward-sensors/tests/kerberos-lab/Dockerfile builds, and the lab_ tests run.
Native WMI over DCOM, read by crates/probeward-sensors/src/proto/wmi/windows.rs. These tests only exist in a Windows build (see building the Windows probe): PROBEWARD_TEST_WMI_HOST (another machine than the one running the test), PROBEWARD_TEST_WMI_USER (DOMAIN\user or user) and PROBEWARD_TEST_WMI_PASSWORD, all required together.
SQL Server, PostgreSQL, MySQL and MariaDB (MSSQL, PGQ, MYSQL, MARIADB)
Read by crates/probeward-sensors/tests/db_live.rs. The account only needs to read.
| Variable | Meaning | Needed | Default |
|---|---|---|---|
PROBEWARD_TEST_PGQ_ADDR, _USER, _PASSWORD | PostgreSQL server as host:port, and a login | All three, or none | The server of PROBEWARD_TEST_DATABASE_URL |
PROBEWARD_TEST_PGQ_TLS | 1 if the server has TLS with a certificate that is not trusted. Turns on the encryption and pin test | Optional | The TLS test prints a line and returns |
PROBEWARD_TEST_MYSQL_ADDR, _USER, _PASSWORD | MySQL server as host:port, and a login | All three | Test prints a line and returns |
PROBEWARD_TEST_MYSQL_TLS | 1 if the server insists on TLS | Optional | Off |
PROBEWARD_TEST_MARIADB_ADDR, _USER, _PASSWORD, _TLS | The same for MariaDB | As for MySQL | |
PROBEWARD_TEST_MSSQL_ADDR, _USER, _PASSWORD | SQL Server as host:port, and a SQL login | All three | Test prints a line and returns |
PROBEWARD_TEST_MSSQL_TLS | 1 if the server insists on TLS | Optional | Off |
PROBEWARD_TEST_MSSQL_WINDOWS_USER, _WINDOWS_PASSWORD | A Windows account (DOMAIN\user) for the same server, for the Windows authentication test | Both, with _ADDR | Test prints a line and returns |
just ci sets MySQL and MariaDB to the containers of compose.dev.yml; see the justfile.
Protocol services: mail, FTP, SFTP, LDAP, RADIUS, NTP, SIP, DHCP
Mail, FTP and SFTP are read by crates/probeward-sensors/tests/mail_ftp_live.rs. Run it with -- --test-threads=1: its tests share one mailbox, and the round trip tests count what is in it.
| Variable | Meaning | Needed | Default |
|---|---|---|---|
PROBEWARD_TEST_MAIL_HOST | Address of the mail server | Required | |
PROBEWARD_TEST_MAIL_NAME | The name its certificate carries | Optional | Empty |
PROBEWARD_TEST_MAIL_USER, _PASSWORD | An account on it | Required | |
PROBEWARD_TEST_MAIL_ADDRESS | The account's mail address | Required | |
PROBEWARD_TEST_MAIL_CA_FILE | PEM file of the authority that issued the certificate | Required | |
PROBEWARD_TEST_FTP_HOST, _NAME, _USER, _PASSWORD, _CA_FILE | The same for an FTP server (explicit TLS) | As for mail, _NAME optional | |
PROBEWARD_TEST_FTP_FOLDER | A folder of the account with files 0, 1, 7 and 30 days old, named file-<n>d.txt | Required | |
PROBEWARD_TEST_SFTP_HOST, _USER, _PASSWORD | An SFTP server (no certificate to check) | Required | |
PROBEWARD_TEST_SFTP_FOLDER | The same kind of folder | Required |
LDAP, RADIUS, NTP, SIP and DHCP are read by crates/probeward-sensors/tests/live_protocols.rs.
| Variable | Meaning | Needed | Default |
|---|---|---|---|
PROBEWARD_TEST_LDAP_HOST | Address of the directory | Required | |
PROBEWARD_TEST_LDAP_BASE | A search base the server holds entries below | Required | |
PROBEWARD_TEST_LDAP_USER | The bind name, a distinguished name whose first part is uid=... | Required | |
PROBEWARD_TEST_LDAP_PASSWORD | Its password | Required | |
PROBEWARD_TEST_LDAP_NAME | The name the certificate carries. With SSL_CERT_FILE, turns on the test that checks the certificate against a trust store | Optional | That test prints a line and returns |
SSL_CERT_FILE | The standard variable: a PEM file of the authority. Also read by the MQTT test. Do not export it for the mail and FTP tests: they check that an authority nobody trusts is refused, and this makes the lab's trusted | Optional | |
PROBEWARD_TEST_RADIUS_HOST | Address of the RADIUS server | Required | |
PROBEWARD_TEST_RADIUS_SECRET | The shared secret | Required | |
PROBEWARD_TEST_RADIUS_USER, _PASSWORD | An account that is accepted | Required | |
PROBEWARD_TEST_NTP_HOST | An NTP server | Required | |
PROBEWARD_TEST_SIP_HOST | A SIP server that answers OPTIONS with 200 over UDP and TCP | Required | |
PROBEWARD_TEST_DHCP_VENDOR | A vendor class the server answers. Also what turns the DHCP test on. Needs port 68 | Required | |
PROBEWARD_TEST_DHCP_INTERFACE | The network interface to use | Optional | The system's choice |
PROBEWARD_TEST_DHCP_SERVER | An address an offer must come from | Optional | Not checked |
Web, MQTT, Modbus and OPC UA
The web tests are read by crates/probeward-sensors/tests/web_flow_live.rs.
| Variable | Meaning | Needed | Default |
|---|---|---|---|
PROBEWARD_TEST_WEB_HOST | Address of the web server. Every web test needs it | Required | |
PROBEWARD_TEST_WEB_NAME | The name its certificate carries | Required for the page load test | |
PROBEWARD_TEST_WEB_PIN | The SHA-256 fingerprint of that certificate | Required for the page load test | |
PROBEWARD_TEST_WEB_USER, _PASSWORD | An account of the identity server | Required for the sign-in test | |
PROBEWARD_TEST_WEB_REALM, _CLIENT | The realm and the client of the identity server | Required for the sign-in test | |
PROBEWARD_TEST_WEB_KEYCLOAK_PORT | The identity server's port | Optional | 8080 |
The industrial tests are read by crates/probeward-sensors/tests/industrial_live.rs.
| Variable | Meaning | Needed | Default |
|---|---|---|---|
PROBEWARD_TEST_MQTT_HOST, _USER, _PASSWORD | The broker and a login | Required | |
PROBEWARD_TEST_MQTT_TOPIC | A retained topic that holds a number | Required | |
PROBEWARD_TEST_MQTT_VALUE | That number | Required | |
PROBEWARD_TEST_MQTT_ROUNDTRIP_TOPIC | A topic the login may publish to and subscribe to | Optional | The round trip test prints a line and returns |
PROBEWARD_TEST_MQTT_NAME | The name the broker's TLS certificate carries | Optional | The TLS test prints a line and returns |
SSL_CERT_FILE | The authority's PEM file, for the trust store check of the TLS test | Optional | That check prints a line |
PROBEWARD_TEST_MODBUS_HOST | A Modbus TCP device | Required | |
PROBEWARD_TEST_MODBUS_PORT | Its port | Optional | 502 |
PROBEWARD_TEST_OPCUA_HOST | An OPC UA server that allows anonymous use with security None | Required | |
PROBEWARD_TEST_OPCUA_PORT | Its port | Optional | 4840 |
PROBEWARD_TEST_OPCUA_NODE | An extra node id to read | Optional | Only the standard i=2267 |
Network quality (NETEM, TRACE)
Read by crates/probeward-sensors/tests/live_quality.rs. The target is a machine with one address per impairment, applied to what it sends back. See the QoS sensor.
| Variable | Meaning | Needed | Default |
|---|---|---|---|
PROBEWARD_TEST_NETEM_CLEAN | Address with no impairment | Required by every test of the file | |
PROBEWARD_TEST_NETEM_DELAY50 | Delay of 50 ms | Required by the ping, QoS tests and trace tests that use it | |
PROBEWARD_TEST_NETEM_DELAY100J | Delay of 100 ms with a jitter setting of 20 ms | As above | |
PROBEWARD_TEST_NETEM_LOSS5 | 5 % loss | As above | |
PROBEWARD_TEST_NETEM_DELAY80J_LOSS2 | 80 ms, plus or minus 10 ms, and 2 % loss | As above | |
PROBEWARD_TEST_NETEM_BLACKHOLE | Everything dropped | As above | |
PROBEWARD_TEST_NETEM_OPEN_PORT | A TCP port that is open on the clean address, with the four ports around it closed | Required by the port range test | |
PROBEWARD_TEST_NETEM_ECHO_PORT | UDP port of a plain echo on each address | Required by the QoS tests | |
PROBEWARD_TEST_NETEM_REFLECTOR_PORT | UDP port of a Probeward reflector on each address | Required by the QoS tests | |
PROBEWARD_TEST_TRACE_FAR | An address a few routers away | Required by the multi-hop traceroute test |
The tests share one target, so the file runs them one at a time. Each test names the variables it lacks.
SNMP
The recordings of devices are read by crates/probeward-sensors/tests/snmpsim_live.rs; a Linux machine is read by crates/probeward-sensors/tests/pve_live.rs, which shares its file with the Proxmox tests.
| Variable | Meaning | Needed | Default |
|---|---|---|---|
PROBEWARD_TEST_SNMPSIM_HOST | Address of an SNMP simulator that serves recordings, each under a community named after it | Required | |
PROBEWARD_TEST_SNMPSIM_COMMUNITIES | The recordings it serves, separated by commas or white space. A test whose recording is not listed prints that and goes on | Required | |
PROBEWARD_TEST_SNMPSIM_PORT | Its UDP port | Optional | 161 |
PROBEWARD_TEST_SNMP_HOST | A Linux machine with an SNMP agent (pve_live.rs) | Required | |
PROBEWARD_TEST_SNMP_COMMUNITY | A v2c community on it | Optional, one of the two logins | |
PROBEWARD_TEST_SNMP_V3_USER, _V3_AUTH, _V3_PRIV | A v3 user with authentication (SHA) and privacy (AES) passwords | Optional, all three |
The recordings are licensed for their own use and are never copied into the repository.
Proxmox and SSH
Read by crates/probeward-sensors/tests/pve_live.rs.
| Variable | Meaning | Needed | Default |
|---|---|---|---|
PROBEWARD_TEST_PVE_HOST | Address of a Proxmox VE host | Required | |
PROBEWARD_TEST_PVE_TOKEN_ID, _TOKEN_SECRET | An API token with the audit role | Required | |
PROBEWARD_TEST_PVE_NODE | The node's name | Optional | pve |
PROBEWARD_TEST_PVE_USER, _PASSWORD | A login used to read the truth from the host, to compare values with | Optional, both | Values are not compared |
PROBEWARD_TEST_PVE_NOPRIV_TOKEN_ID, _NOPRIV_TOKEN_SECRET | A token with no role, for the permission message test | Optional, both | That test prints a line and returns |
PROBEWARD_TEST_PVE_BACKUP_VMID | A guest with a recent backup | Optional | Not checked |
PROBEWARD_TEST_PVE_NO_BACKUP_VMID | A guest that has never been backed up | Optional | Not checked |
PROBEWARD_TEST_PVE_RECORD_PATH | An API path whose raw answer record_raw prints, for making fixtures | Optional | Nothing is recorded |
PROBEWARD_TEST_SSH_HOST, _USER | A Linux machine and an account | Required for the SSH test | |
PROBEWARD_TEST_SSH_KEY_FILE | A readable file with the account's private key | Required for the SSH test |
VMware and BMC
VMware is read by crates/probeward-sensors/tests/vmware_live.rs.
| Variable | Meaning | Needed | Default |
|---|---|---|---|
PROBEWARD_TEST_VSPHERE_HOST | Address of an ESXi host or vCenter | Required | |
PROBEWARD_TEST_VSPHERE_USER, _PASSWORD | A login that can read | Required |
Redfish is read by crates/probeward-sensors/tests/bmc_live.rs. All six are required.
| Variable | Meaning |
|---|---|
PROBEWARD_TEST_REDFISH_HOST | Address of the Redfish service |
PROBEWARD_TEST_REDFISH_PORT | Its port |
PROBEWARD_TEST_REDFISH_NAME | The name its certificate carries |
PROBEWARD_TEST_REDFISH_PIN | That certificate's SHA-256 fingerprint |
PROBEWARD_TEST_REDFISH_USER, _PASSWORD | A login |
AWS CloudWatch
Read by crates/probeward-sensors/tests/aws_cloudwatch_live.rs. The target is a CloudWatch-compatible endpoint such as AWS Emulator (see the sensor's page; run it with --telemetry off). The tests put their own metrics in a namespace of their own with PutMetricData, so the key needs that permission too. The wrong-secret test expects the endpoint to check signatures, as the emulator does.
| Variable | Meaning | Needed | Default |
|---|---|---|---|
PROBEWARD_TEST_AWS_ENDPOINT | The service's URL, with an IP address as host, for example https://192.0.2.10:9297 | Required | |
PROBEWARD_TEST_AWS_REGION | The region to sign for, for example us-east-1 | Required | |
PROBEWARD_TEST_AWS_KEY_ID, _SECRET | An access key the endpoint accepts | Required | |
PROBEWARD_TEST_AWS_PIN | SHA-256 fingerprint of the endpoint's certificate, when it is self-signed | Optional | The system's trust store decides |
The same five variables are read by the screenshots of the sensor, where _PIN is required: the picture run seeds the metrics it shows with PutMetricData first.
Receivers (TRAP, SYSLOG)
Read by crates/probeward-sensors/tests/live_receivers.rs. The tests listen on the ports devices use and wait for a device to send something, so something has to make it send while they wait. They need ports 162 and 514.
| Variable | Meaning | Needed | Default |
|---|---|---|---|
PROBEWARD_TEST_TRAP_SOURCE | The address a device sends traps from. Turns the trap test on | Required | |
PROBEWARD_TEST_TRAP_OID | The trap OID (or a prefix) at least one trap must have | Optional | Any trap |
PROBEWARD_TEST_SYSLOG_SOURCE | The address a device sends syslog from. Turns the syslog test on | Required | |
PROBEWARD_TEST_SYSLOG_TEXT | Text at least one message must contain | Optional | Any message |
PROBEWARD_TEST_RECEIVER_WAIT_SECS | How long to wait for the device | Optional | 90 |
Flows (FLOW)
Read by crates/probeward-sensors/tests/live_flows.rs. The tests run the real sensors with the real collectors, which listen on UDP 2055 and 6343 (above 1023, so no privilege is needed), and poll until the device's traffic shows, so something has to make the device carry traffic while they wait: many short connections to it, or through it (a router exports a flow when it ends or has been idle, so one long ping shows only when it stops). A NetFlow v9 or IPFIX device sends its templates now and then, so the first reading can take a minute or two. Run with PROBEWARD_FLOW_INTERVAL_SECS=5.
| Variable | Meaning | Needed | Default |
|---|---|---|---|
PROBEWARD_TEST_FLOW_NETFLOW_SOURCE | The address a device exports NetFlow or IPFIX from. Turns the NetFlow test on | Required | |
PROBEWARD_TEST_FLOW_SFLOW_SOURCE | The address a device exports sFlow from. Turns the sFlow test on | Required | |
PROBEWARD_TEST_FLOW_SFLOW_RATE | The sampling rate that device is set to; the sensor's message must say so | Optional | Not checked |
PROBEWARD_TEST_FLOW_INTERFACE | An interface index the sFlow device exports; a second sensor for that interface alone must see traffic and its counters | Optional | Not run |
PROBEWARD_TEST_FLOW_WAIT_SECS | How long to wait for traffic | Optional | 120 |
Database tests of the project itself
These are not lab targets. Their defaults work with just dev-up, and just ci sets them.
| Variable | Meaning | Default | Read by |
|---|---|---|---|
PROBEWARD_TEST_DATABASE_URL | The PostgreSQL server every database test makes its own database on. The account must be allowed to create databases | postgres://probeward:probeward@127.0.0.1:54329/probeward | crates/probeward-store/src/testkit.rs, crates/probeward-sensors/tests/db_live.rs, the examples chart_bench and capacity |
PROBEWARD_TEST_PG_CONTAINER | The container the backup tests run pg_dump in | probeward-dev-postgres-1 | crates/probeward-store/tests/db/backup.rs |
PROBEWARD_TEST_PG_USER | The user for those tools | probeward | the same |
Local daemons
The tests in crates/probeward-sensors/tests/live.rs, live_more.rs and crates/probeward-server/tests/live/main.rs start real programs (snmpd, sshd, dnsmasq and others) on this machine, and need no lab.
| Variable | Meaning | Default |
|---|---|---|
PROBEWARD_SKIP_DAEMON_TESTS | 1 skips a test whose program is not installed, and says so. Otherwise it fails and says what to install | Off |
PROBEWARD_TEST_PLUGIN_DIR | A directory of monitoring plugins for the plugin tests | The usual system folders, then a copy extracted from a container |
PROBEWARD_TEST_HIDE_BINARY | A program name the tests pretend is missing, to check what a machine without it sees | Unset |
Names hidden in screenshots
The Playwright run that makes the screenshots of the sensors reads the same variables as the live tests, plus some of its own, and does not write their values anywhere. A _HIDE variable is a comma-separated list of names that the run replaces in every picture with a neutral one. A case whose variables are not set is skipped, and the run says which. The list is the lab's host names, domains and account names, so keep it with the other variables.
| Variable | Hides |
|---|---|
PROBEWARD_TEST_WINRM_HIDE | Names of the Windows machine, such as its host name and domain |
PROBEWARD_TEST_VSPHERE_HIDE | The ESXi host's and the machines' names. An entry is name or name=shown instead |
PROBEWARD_TEST_PGQ_HIDE, _MYSQL_HIDE, _MSSQL_HIDE | Names of a database server (only the SQL Server one is masked, and the address becomes 192.0.2.10) |
PROBEWARD_TEST_NETSVC_HIDE | Names of the protocol services machine: host, domain, organisation |
PROBEWARD_TEST_NETSVC_ACCOUNTS | The accounts of that machine |
PROBEWARD_TEST_IOT_HIDE | Names of the MQTT, Modbus and OPC UA machine |
PROBEWARD_TEST_WEB_HIDE | Names of the web server and its identity server |
The pictures also read these variables that no live test does:
| Variable | Meaning |
|---|---|
PROBEWARD_TEST_NETSVC_HOST, _NETSVC_PASSWORD | The protocol services machine's address, and the one password every account has. The live tests give the same machine as _LDAP_HOST, _RADIUS_HOST and so on |
PROBEWARD_TEST_VSPHERE_VM | A powered-on machine, for the vmware_vm picture |
PROBEWARD_TEST_VSPHERE_DATASTORE | The datastore to photograph, default datastore1 |
Tests that need privileges
Three tests need a port below 1024 that an ordinary user may not bind:
| Test | Port | Variables |
|---|---|---|
dhcp_discover_gets_an_offer_and_never_requests_it in live_protocols.rs | UDP 68 | PROBEWARD_TEST_DHCP_VENDOR |
a_real_device_s_traps_are_read in live_receivers.rs | UDP 162 | PROBEWARD_TEST_TRAP_SOURCE |
a_real_device_s_syslog_is_read in live_receivers.rs | UDP 514 | PROBEWARD_TEST_SYSLOG_SOURCE |
Run as an ordinary user they print that the port needs a privilege and return. To run them, build the test binary as yourself and run the binary in a container on the host network, where the container's root may bind the ports:
cargo test -p probeward-sensors --test live_protocols --no-run # prints the path of the test binary
BIN=target/debug/deps/live_protocols-0123456789abcdef # use the path it printed
docker run --rm --network host -v "$PWD/$BIN:/t/live_protocols:ro" \
-e PROBEWARD_TEST_DHCP_VENDOR -e PROBEWARD_TEST_DHCP_INTERFACE -e PROBEWARD_TEST_DHCP_SERVER \
debian:stable-slim /t/live_protocols dhcp --nocaptureFor the receivers, name live_receivers instead, pass PROBEWARD_TEST_TRAP_SOURCE, _TRAP_OID, _SYSLOG_SOURCE, _SYSLOG_TEXT and _RECEIVER_WAIT_SECS with -e, and make the device send while the test waits. The host's firewall must let the device's packets in on the port. PROBEWARD_TRAP_LISTEN and PROBEWARD_SYSLOG_LISTEN move the listeners to other ports, which a device that cannot be told another port does not help.
The container only runs the binary, so the machine needs no Rust toolchain in it, and the binary has to be one that runs on the container's C library: build it on a machine with an equal or older glibc than the image, or use an image of the same distribution as the one you build on.