Skip to content

Commit

Permalink
Add additional check for io noop
Browse files Browse the repository at this point in the history
Signed-off-by: Devanshu <[email protected]>
  • Loading branch information
devanshuVmware committed Nov 19, 2024
1 parent 6566ae3 commit bd23c2b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cli/pkg/kctrl/cmd/app/release/release_cmd_runner_test.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
package release

import (
"os"
"bytes"
"os/exec"
"testing"

"github.com/stretchr/testify/require"
)

func TestReleaseCmdRunnerForKappCmd(t *testing.T) {
ReleaseCmdRunner := NewReleaseCmdRunner(os.Stdout, false, "", false, nil)
var buf bytes.Buffer
ReleaseCmdRunner := NewReleaseCmdRunner(&buf, false, "", false, nil)
cmd := exec.Command("kapp", "deploy", "-f", "-", "-a", "pkg-test", "-y")
err := ReleaseCmdRunner.RunWithCancel(cmd, nil)
require.NoError(t, err)
expectedLength := 0
if actualLength := buf.Len(); actualLength != expectedLength {
t.Errorf("Got Buffer length = %d, Expected empty", actualLength)
}
}

0 comments on commit bd23c2b

Please sign in to comment.