Skip to content

Commit ae8785b

Browse files
devanshuVmware100mik
authored andcommitted
Add additional check for io noop
Signed-off-by: Devanshu <[email protected]>
1 parent e636e86 commit ae8785b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
package release
22

33
import (
4-
"os"
4+
"bytes"
55
"os/exec"
66
"testing"
77

88
"github.com/stretchr/testify/require"
99
)
1010

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

0 commit comments

Comments
 (0)