diff --git a/pkg/console/golden_test.go b/pkg/console/golden_test.go index 94c40799b85..40a76a8218d 100644 --- a/pkg/console/golden_test.go +++ b/pkg/console/golden_test.go @@ -325,15 +325,6 @@ func nonTTYProgressBar(total int64) *ProgressBar { return bar } -// nonTTYIndeterminateProgressBar returns an indeterminate ProgressBar in non-TTY -// mode, ensuring tests always take the text-only branch and never call ViewAs on -// the bubbles model. -func nonTTYIndeterminateProgressBar() *ProgressBar { - bar := NewIndeterminateProgressBar() - bar.ttyCheck = func() bool { return false } - return bar -} - // TestGolden_ProgressBarNonTTY tests the deterministic non-TTY outputs of ProgressBar.Update. // These cases are pure and side-effect-free, making them ideal for golden coverage. // ttyCheck is overridden to always return false so the tests run unconditionally, @@ -358,16 +349,6 @@ func TestGolden_ProgressBarNonTTY(t *testing.T) { bar := nonTTYProgressBar(0) golden.RequireEqual(t, []byte(bar.Update(0))) }) - - t.Run("indeterminate_no_data", func(t *testing.T) { - bar := nonTTYIndeterminateProgressBar() - golden.RequireEqual(t, []byte(bar.Update(0))) - }) - - t.Run("indeterminate_with_data", func(t *testing.T) { - bar := nonTTYIndeterminateProgressBar() - golden.RequireEqual(t, []byte(bar.Update(512*1024*1024))) - }) } // TestGolden_InfoSection tests info section rendering diff --git a/pkg/console/progress.go b/pkg/console/progress.go index cdf15f5205f..a57b3051113 100644 --- a/pkg/console/progress.go +++ b/pkg/console/progress.go @@ -70,24 +70,6 @@ func NewProgressBar(total int64) *ProgressBar { } } -// NewIndeterminateProgressBar creates a new progress bar in indeterminate mode -// for use when the total size is not known. The progress bar automatically adapts -// to TTY/non-TTY environments. -func NewIndeterminateProgressBar() *ProgressBar { - progressLog.Printf("Creating indeterminate progress bar") - prog := progress.New( - progress.WithColors(styles.ColorPurple, styles.ColorInfo), - progress.WithScaled(true), - progress.WithWidth(40), - ) - prog.EmptyColor = styles.ColorComment - return &ProgressBar{ - progress: prog, - indeterminate: true, - ttyCheck: isTTY, - } -} - // Update updates the current progress and returns a formatted string // In determinate mode: // - TTY: Returns a visual progress bar with gradient and percentage