1
0
mirror of https://github.com/docker/cli.git synced 2026-01-26 15:41:42 +03:00

cli/connhelper: replace reflect for gotest.tools assertion

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-12-23 15:46:31 +01:00
parent a89b2e19f5
commit 3811f24f47

View File

@@ -1,7 +1,6 @@
package connhelper
import (
"reflect"
"testing"
"gotest.tools/v3/assert"
@@ -27,7 +26,8 @@ func TestSSHFlags(t *testing.T) {
}
for _, tc := range testCases {
assert.DeepEqual(t, addSSHTimeout(tc.in), tc.out)
result := addSSHTimeout(tc.in)
assert.DeepEqual(t, result, tc.out)
}
}
@@ -57,9 +57,7 @@ func TestDisablePseudoTerminalAllocation(t *testing.T) {
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
result := disablePseudoTerminalAllocation(tc.sshFlags)
if !reflect.DeepEqual(result, tc.expected) {
t.Errorf("expected %v, got %v", tc.expected, result)
}
assert.DeepEqual(t, result, tc.expected)
})
}
}