Commit 6b3aa05
tests: Add integration tests for port forwarding
Add comprehensive integration tests for the libvirt port forwarding feature:
1. test_libvirt_port_forward_parsing: Validates CLI argument parsing
for various valid port forwarding formats (--port 8080:80, -p 80:80, etc.)
2. test_libvirt_port_forward_invalid: Tests error handling for invalid
port formats (missing port, invalid numbers, out of range, etc.)
3. test_libvirt_port_forward_xml: Verifies that port forwarding is
correctly configured in the libvirt domain XML with QEMU hostfwd args
4. test_libvirt_port_forward_connectivity: End-to-end test that creates
a VM with port forwarding, starts an HTTP server inside the VM, and
verifies connectivity from the host through the forwarded port
The tests follow the existing integration test patterns using the
distributed slice mechanism for test registration and include proper
cleanup of test VMs.
Assisted-by: Claude Code
Signed-off-by: ckyrouac <[email protected]>1 parent 181efce commit 6b3aa05
File tree
2 files changed
+532
-0
lines changed- crates/integration-tests/src
- tests
2 files changed
+532
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
0 commit comments