src/test/java/org/embulk/output/sftp/TestSftpFileOutputPlugin.java in embulk-output-sftp-0.2.0 vs src/test/java/org/embulk/output/sftp/TestSftpFileOutputPlugin.java in embulk-output-sftp-0.2.1
- old
+ new
@@ -610,11 +610,11 @@
{
SftpFileOutputPlugin.PluginTask task = defaultTask();
SftpUtils utils = Mockito.spy(new SftpUtils(task));
// append throws exception
- Mockito.doThrow(new IOException(new JSchException("USERAUTH fail")))
+ Mockito.doThrow(new IOException(new JSchException("Auth fail")))
.doCallRealMethod()
.when(utils)
.appendFile(Mockito.any(File.class), Mockito.any(FileObject.class), Mockito.any(BufferedOutputStream.class));
byte[] expected = randBytes(8);
@@ -625,10 +625,10 @@
}
catch (Exception e) {
assertThat(e, CoreMatchers.<Exception>instanceOf(RuntimeException.class));
assertThat(e.getCause(), CoreMatchers.<Throwable>instanceOf(IOException.class));
assertThat(e.getCause().getCause(), CoreMatchers.<Throwable>instanceOf(JSchException.class));
- assertEquals(e.getCause().getCause().getMessage(), "USERAUTH fail");
+ assertEquals(e.getCause().getCause().getMessage(), "Auth fail");
// assert no retry
Mockito.verify(utils, Mockito.times(1)).appendFile(Mockito.any(File.class), Mockito.any(FileObject.class), Mockito.any(BufferedOutputStream.class));
assertEmptyUploadedFile(defaultPathPrefix);
}
}