debian-forge-cli/pkg/progress/export_test.go
Simon de Vlieger f4bbd3e048 import: move bib files to correct path
Moves the files imported from `bootc-image-builder` directly under `pkg`
so they can be imported in reverse. Also fix up any import paths at the
same time.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-03-31 19:42:59 +00:00

47 lines
818 B
Go

package progress
import (
"io"
)
type (
TerminalProgressBar = terminalProgressBar
DebugProgressBar = debugProgressBar
VerboseProgressBar = verboseProgressBar
)
var (
NewSyncedWriter = newSyncedWriter
)
func MockOsStdout(w io.Writer) (restore func()) {
saved := osStdout
osStdout = func() io.Writer { return w }
return func() {
osStdout = saved
}
}
func MockOsStderr(w io.Writer) (restore func()) {
saved := osStderr
osStderr = func() io.Writer { return w }
return func() {
osStderr = saved
}
}
func MockIsattyIsTerminal(fn func(uintptr) bool) (restore func()) {
saved := isattyIsTerminal
isattyIsTerminal = fn
return func() {
isattyIsTerminal = saved
}
}
func MockOsbuildCmd(s string) (restore func()) {
saved := osbuildCmd
osbuildCmd = s
return func() {
osbuildCmd = saved
}
}