diff --git a/internal/cmd/local/k8s/log_test.go b/internal/cmd/local/k8s/log_test.go index abf284a..5bfd1dc 100644 --- a/internal/cmd/local/k8s/log_test.go +++ b/internal/cmd/local/k8s/log_test.go @@ -11,12 +11,12 @@ import ( func TestLogger_HandleWarningHeader(t *testing.T) { b := bytes.NewBufferString("") - pterm.SetDefaultOutput(b) + pterm.Debug.Writer = b pterm.EnableDebugMessages() // remove color codes from output pterm.DisableColor() t.Cleanup(func() { - pterm.SetDefaultOutput(os.Stdout) + pterm.Debug.Writer = os.Stdout pterm.DisableDebugMessages() pterm.EnableColor() }) diff --git a/internal/cmd/local/local_deployments_test.go b/internal/cmd/local/local_deployments_test.go index 1ff45ae..0c87113 100644 --- a/internal/cmd/local/local_deployments_test.go +++ b/internal/cmd/local/local_deployments_test.go @@ -18,11 +18,13 @@ import ( func TestDeploymentsCmd(t *testing.T) { b := bytes.NewBufferString("") + pterm.Info.Writer = b + // SetDefaultOutput isn't overriding the Info.Writer pterm.SetDefaultOutput(b) pterm.EnableDebugMessages() - // remove color codes from output pterm.DisableColor() t.Cleanup(func() { + pterm.Info.Writer = os.Stdout pterm.SetDefaultOutput(os.Stdout) pterm.DisableDebugMessages() pterm.EnableColor()