--- runEncrypt interactive path (injected readPasswordFn) ---
(t *testing.T)
| 147 | // --- runEncrypt interactive path (injected readPasswordFn) --- |
| 148 | |
| 149 | func 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 | |
| 160 | func TestRunEncrypt_Interactive_ShortPassword(t *testing.T) { |
| 161 | defer resetMocks() |
nothing calls this directly
no test coverage detected