diff options
| author | Tim Orling <ticotimo@gmail.com> | 2026-04-27 17:33:41 -0700 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-04-28 11:47:27 +0000 |
| commit | 052241689a0c419d13e15e83e7ad65dd16fc8ffd (patch) | |
| tree | 2845b2cddca72c2809b74a444a9155870bd5433f | |
| parent | 96403a227c4f099606ec23067ced224fb405da8f (diff) | |
| download | meta-virtualization-052241689a0c419d13e15e83e7ad65dd16fc8ffd.tar.gz | |
test_vdkr_registry: fix test_image_requires_subcommand
vdkr.run() merges stderr into stdout (see conftest.py), so the
error message ends up in result.stdout even though the script
writes it to stderr (>&2).
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
| -rw-r--r-- | tests/test_vdkr_registry.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_vdkr_registry.py b/tests/test_vdkr_registry.py index 9073444d..72a27169 100644 --- a/tests/test_vdkr_registry.py +++ b/tests/test_vdkr_registry.py | |||
| @@ -259,7 +259,11 @@ class TestImageCompoundCommands: | |||
| 259 | """Test that 'image' without subcommand shows error.""" | 259 | """Test that 'image' without subcommand shows error.""" |
| 260 | result = self.vdkr.run("image", check=False) | 260 | result = self.vdkr.run("image", check=False) |
| 261 | assert result.returncode != 0 | 261 | assert result.returncode != 0 |
| 262 | assert "subcommand" in result.stderr.lower() or "requires" in result.stderr.lower() | 262 | # vdkr.run() merges stderr into stdout (see conftest.py), so the |
| 263 | # error message ends up in result.stdout even though the script | ||
| 264 | # writes it to stderr (>&2). | ||
| 265 | combined = (result.stdout + result.stderr).lower() | ||
| 266 | assert "subcommand" in combined or "requires" in combined | ||
| 263 | 267 | ||
| 264 | 268 | ||
| 265 | class TestRegistryCLIOverride: | 269 | class TestRegistryCLIOverride: |
