diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-01-08 19:34:19 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-01-21 18:00:26 -0500 |
| commit | ef5dc63c8c9d4f84e88f8622b44491303ca99f72 (patch) | |
| tree | 5019261611187b44fb532139d1126047bb4aaa58 /tests | |
| parent | 22eedc4b864106f97f3443d0aa36133c33949bd8 (diff) | |
| download | meta-virtualization-ef5dc63c8c9d4f84e88f8622b44491303ca99f72.tar.gz | |
vcontainer: fix ps -q to suppress port forward display
When using `ps -q` or `ps --quiet`, only container IDs should be output.
The port forward registry display was being included, which broke cleanup
code that expected just container IDs.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_vdkr.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_vdkr.py b/tests/test_vdkr.py index c343e05f..33744107 100644 --- a/tests/test_vdkr.py +++ b/tests/test_vdkr.py | |||
| @@ -101,16 +101,16 @@ class TestPortForwarding: | |||
| 101 | # Stop any running memres first | 101 | # Stop any running memres first |
| 102 | vdkr.memres_stop() | 102 | vdkr.memres_stop() |
| 103 | 103 | ||
| 104 | # Start memres with port forwarding | 104 | # Start memres (no static port forwards needed - use dynamic via -p on run) |
| 105 | result = vdkr.memres_start(timeout=180, port_forwards=["8080:80"]) | 105 | result = vdkr.memres_start(timeout=180) |
| 106 | assert result.returncode == 0, f"memres start failed: {result.stderr}" | 106 | assert result.returncode == 0, f"memres start failed: {result.stderr}" |
| 107 | 107 | ||
| 108 | try: | 108 | try: |
| 109 | # Pull nginx:alpine if not present | 109 | # Pull nginx:alpine if not present |
| 110 | vdkr.run("pull", "nginx:alpine", timeout=300) | 110 | vdkr.run("pull", "nginx:alpine", timeout=300) |
| 111 | 111 | ||
| 112 | # Run nginx (--network=host is the default) | 112 | # Run nginx with port forward - Docker sets up iptables for bridge networking |
| 113 | result = vdkr.run("run", "-d", "--rm", "nginx:alpine", timeout=60) | 113 | result = vdkr.run("run", "-d", "--rm", "-p", "8080:80", "nginx:alpine", timeout=60) |
| 114 | assert result.returncode == 0, f"nginx run failed: {result.stderr}" | 114 | assert result.returncode == 0, f"nginx run failed: {result.stderr}" |
| 115 | 115 | ||
| 116 | # Give nginx time to start | 116 | # Give nginx time to start |
