Skip to content

Commit b3c85b0

Browse files
committed
feature(4890): added error checks in tests
1 parent 29ebdf4 commit b3c85b0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

internal/pkg/agent/cmd/upgrade_test.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package cmd
66

77
import (
88
"context"
9+
"log"
910
"net"
1011
"sync/atomic"
1112
"testing"
@@ -222,7 +223,10 @@ func TestUpgradeCmd(t *testing.T) {
222223
streams := cli.NewIOStreams()
223224
cmd := newUpgradeCommandWithArgs(args, streams)
224225
cmd.SetContext(context.Background())
225-
cmd.Flags().Set("force", "true")
226+
err = cmd.Flags().Set("force", "true")
227+
if err != nil {
228+
log.Fatal(err)
229+
}
226230

227231
commandInput := &upgradeInput{
228232
streams,
@@ -282,7 +286,10 @@ func TestUpgradeCmd(t *testing.T) {
282286
streams := cli.NewIOStreams()
283287
cmd := newUpgradeCommandWithArgs(args, streams)
284288
cmd.SetContext(context.Background())
285-
cmd.Flags().Set("force", "true")
289+
err = cmd.Flags().Set("force", "true")
290+
if err != nil {
291+
log.Fatal(err)
292+
}
286293

287294
commandInput := &upgradeInput{
288295
streams,

0 commit comments

Comments
 (0)