Skip to content

Commit e8e5ce8

Browse files
devanshuVmware100mik
authored andcommitted
Use require for empty assertion
Signed-off-by: Devanshu <[email protected]>
1 parent ae8785b commit e8e5ce8

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

cli/pkg/kctrl/cmd/app/release/release_cmd_runner_test.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@ import (
1111
func TestReleaseCmdRunnerForKappCmd(t *testing.T) {
1212
var buf bytes.Buffer
1313
ReleaseCmdRunner := NewReleaseCmdRunner(&buf, false, "", false, nil)
14-
cmd := exec.Command("kapp", "deploy", "-f", "-", "-a", "pkg-test", "-y")
14+
cmd := exec.Command("kapp", "deploy", "-f", "https://github.com/carvel-dev/kapp-controller/releases/latest/download/release.yml", "-a", "pkg-test", "-y")
1515
err := ReleaseCmdRunner.RunWithCancel(cmd, nil)
1616
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-
}
17+
require.Emptyf(t, buf.Len(), "Expected buf length 0 but got %d", buf.Len())
2118
}

0 commit comments

Comments
 (0)