image-builder: update TestBuildIntegrationErrors tests

This commit updates the tests for the error reporting. Since
we are now using the new "progress" module we can no longer
directly mock osStderr. So this now uses the new testutil
helper `CaptureStdio`.

Note also that the behavior of `verbose` and `term` is slightly
different - for backward compatibility in `verbose` mode the
stderr from osbuild is directly connected to the caller stderr.

For term mode this is not done to prevent spurious message from
leaking into the terminal progress and the full error is available
from the actual go error as captured output.
This commit is contained in:
Michael Vogt 2025-01-29 12:56:22 +01:00
parent e41cf0e429
commit f46ca14f85
3 changed files with 53 additions and 18 deletions

2
go.mod
View file

@ -9,7 +9,7 @@ toolchain go1.22.2
require (
github.com/BurntSushi/toml v1.4.0
github.com/gobwas/glob v0.2.3
github.com/osbuild/bootc-image-builder/bib v0.0.0-20250125114430-c5d674173ba0
github.com/osbuild/bootc-image-builder/bib v0.0.0-20250128074618-f6403409fc97
github.com/osbuild/images v0.112.0
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.1