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

Function TestRunEncrypt_Interactive_EmptyPassword

cmd/encrypt/encrypt_test.go:149–158  ·  view source on GitHub ↗

--- runEncrypt interactive path (injected readPasswordFn) ---

(t *testing.T)

Source from the content-addressed store, hash-verified

147// --- runEncrypt interactive path (injected readPasswordFn) ---
148
149func TestRunEncrypt_Interactive_EmptyPassword(t *testing.T) {
150 defer resetMocks()
151
152 var fatalMsg string
153 fatalFn = func(args ...interface{}) { fatalMsg = fmt.Sprint(args...) }
154 readPasswordFn = func(_ string) ([]byte, error) { return []byte{}, nil }
155
156 runEncrypt()
157 assert.Contains(t, fatalMsg, "empty")
158}
159
160func TestRunEncrypt_Interactive_ShortPassword(t *testing.T) {
161 defer resetMocks()

Callers

nothing calls this directly

Calls 2

resetMocksFunction · 0.85
runEncryptFunction · 0.85

Tested by

no test coverage detected