Comments (6)
It is very cool, that you added this method. But I think, it does not work correctly. Just small test from my side shows it. Test is failed with exception, that directory is already exist.
public class FakeTest {
@ClassRule
public static final FakeSftpServerRule sftpServer = new FakeSftpServerRule().setPort(8394);
private static final JSch JSCH = new JSch();
private static ChannelSftp connectSftpChannel(
Session session
) throws JSchException {
ChannelSftp channel = (ChannelSftp) session.openChannel("sftp");
channel.connect();
return channel;
}
@Test
public void testDeleteSubdirectories() throws IOException, JSchException, SftpException {
sftpServer.createDirectory("/firsLevel/secondLevel/thirdLevel");
sftpServer.createDirectory("/firsLevel/secondLevel/thirdLevel1");
sftpServer.createDirectory("/firsLevel/secondLevel/thirdLevel2");
sftpServer.deleteAllFilesAndDirectories();
sftpServer.createDirectory("/firsLevel/secondLevel/thirdLevel3");
Session session = JSCH.getSession(
"dummy user", "127.0.0.1", sftpServer.getPort());
session.setConfig("StrictHostKeyChecking", "no");
session.setPassword("dummy password");
session.connect(20000);
ChannelSftp channelSftp = connectSftpChannel(session);
channelSftp.rename("/firsLevel/secondLevel/thirdLevel3", "/firsLevel/secondLevel/thirdLevel2");
}
}
from fake-sftp-server-rule.
The bugfix release 1.3.1 is available on Maven Central.
from fake-sftp-server-rule.
Many thanks. Now it works as expected !!!!
from fake-sftp-server-rule.
Hi @OArtyomov,
thanks for the feature request. Can you explain your use case, please. I would like to understand why this method is needed.
from fake-sftp-server-rule.
Release 1.3.0 has a new method deleteAllFilesAndDirectories
.
from fake-sftp-server-rule.
Thanks for testing the new release. I found the bug and fix it within the next few days.
from fake-sftp-server-rule.
Related Issues (20)
- TestNG support HOT 3
- incompatibility with sshd-core 2.0.0 HOT 3
- junit5 compatible version HOT 9
- Require to use the fake sftp server with java 1.7 HOT 1
- Known host file not configured, using user known host file: C:\Users\Sam/.ssh/known_hosts HOT 2
- SSH key support HOT 2
- ServiceConfigurationError when calling @Rule HOT 1
- PowerMock and FakeSftpServerRule Server wont start HOT 1
- Support Junit5 Jupiter HOT 2
- Getting Software caused connection abort: socket write error HOT 1
- Set file modification time during upload
- Get a directory listing or use wildcard with existsFile
- How to simulate failure scenario ? HOT 3
- FakeSftpServerRule.createDirectory should accept a varargs parameter HOT 2
- Support for junit 5 HOT 1
- pom dependency error com.github.marschall 1.0.1-SNAPSHOT HOT 1
- Support for user accounts/testing credentials HOT 1
- fake-sftp-server-rule compatible with java 7 HOT 1
- multiple errors HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fake-sftp-server-rule.