Skip to content

Commit 3811f24

Browse files
committed
cli/connhelper: replace reflect for gotest.tools assertion
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent a89b2e1 commit 3811f24

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

cli/connhelper/connhelper_test.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package connhelper
22

33
import (
4-
"reflect"
54
"testing"
65

76
"gotest.tools/v3/assert"
@@ -27,7 +26,8 @@ func TestSSHFlags(t *testing.T) {
2726
}
2827

2928
for _, tc := range testCases {
30-
assert.DeepEqual(t, addSSHTimeout(tc.in), tc.out)
29+
result := addSSHTimeout(tc.in)
30+
assert.DeepEqual(t, result, tc.out)
3131
}
3232
}
3333

@@ -57,9 +57,7 @@ func TestDisablePseudoTerminalAllocation(t *testing.T) {
5757
for _, tc := range testCases {
5858
t.Run(tc.name, func(t *testing.T) {
5959
result := disablePseudoTerminalAllocation(tc.sshFlags)
60-
if !reflect.DeepEqual(result, tc.expected) {
61-
t.Errorf("expected %v, got %v", tc.expected, result)
62-
}
60+
assert.DeepEqual(t, result, tc.expected)
6361
})
6462
}
6563
}

0 commit comments

Comments
 (0)