fake-sftp-server-rule | A JUnit rule that runs an in-memory SFTP server | Continuous Deployment library
kandi X-RAY | fake-sftp-server-rule Summary
kandi X-RAY | fake-sftp-server-rule Summary
Fake SFTP Server Rule is a JUnit rule that runs an in-memory SFTP server while your tests are running. It uses the SFTP server of the Apache SSHD project. Fake SFTP Server Rule is published under the MIT license. It requires at least Java 8. Please open an issue if you want to use it with an older version of Java. I want to thank my former team SAM at ThoughtWorks for using this library and @crizzis, @OArtyomov and @TheSentinel454 for their feature requests. There is an alternative to Fake SFTP Server Rule that is independent of the test framework. Its name is Fake SFTP Server Lambda.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Start the server
- Starts the server
- Creates the file system
- Returns the port of the server
- Gets the port from the server
- Verifies that the test is running
- Sets the port of the rule
- Restart the SFTP server
- Creates a set of directories
- Creates a directory on the FTP server
- Checks if a file exists
- Registers a user
- Authenticate against the given session and password
- Deletes all the files and directories
fake-sftp-server-rule Key Features
fake-sftp-server-rule Examples and Code Snippets
Community Discussions
Trending Discussions on fake-sftp-server-rule
QUESTION
We actually use JUnit
and the great FakeSftpServerRule
junit rule to test a custom SFTP client we made. That was working great.
Lastly, we want to get rid of junit in favor of the spock framework because we try to migrate to groovy.
Do you guys know any equivalent of FakeSftpServerRule
or any way to "switch" a junit rule into a spock rule equivalent ?
Thank you a lot.
...ANSWER
Answered 2022-Feb-13 at 00:56The same author also published Fake SFTP Server Lambda, which is independent of the test framework in contrast to the JUnit 4 rule you use.
If you want to stick with the old tool, Spock 1.3 can also use JUnit 4 rules, and in Spock 2.x it might also work with the JUnit 4 compatibility layer.
Update: Here is an example program using the SSHJ library for downloading a file from an SFTP server, so we have a subject under test:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install fake-sftp-server-rule
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page