(t *testing.T)
| 187 | } |
| 188 | |
| 189 | func TestRunEncrypt_Interactive_ReadError(t *testing.T) { |
| 190 | defer resetMocks() |
| 191 | |
| 192 | var fatalMsg string |
| 193 | fatalFn = func(args ...interface{}) { fatalMsg = fmt.Sprint(args...) } |
| 194 | readPasswordFn = func(_ string) ([]byte, error) { return nil, errors.New("read error") } |
| 195 | |
| 196 | runEncrypt() |
| 197 | assert.Contains(t, fatalMsg, "Failed to read password") |
| 198 | } |
| 199 | |
| 200 | func TestRunEncrypt_Interactive_ConfirmReadError(t *testing.T) { |
| 201 | defer resetMocks() |
nothing calls this directly
no test coverage detected