MCPcopy Create free account
hub / github.com/Driver-C/tryssh / TestRunEncrypt_Interactive_ShortPassword

Function TestRunEncrypt_Interactive_ShortPassword

cmd/encrypt/encrypt_test.go:160–169  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

158}
159
160func TestRunEncrypt_Interactive_ShortPassword(t *testing.T) {
161 defer resetMocks()
162
163 var fatalMsg string
164 fatalFn = func(args ...interface{}) { fatalMsg = fmt.Sprint(args...) }
165 readPasswordFn = func(_ string) ([]byte, error) { return []byte("abc"), nil }
166
167 runEncrypt()
168 assert.Contains(t, fatalMsg, "at least 4 characters")
169}
170
171func TestRunEncrypt_Interactive_PasswordMismatch(t *testing.T) {
172 defer resetMocks()

Callers

nothing calls this directly

Calls 2

resetMocksFunction · 0.85
runEncryptFunction · 0.85

Tested by

no test coverage detected