1

I'm trying to unit test a mule flow that has an ftp:inbound-endpoint and an sftp:outbound-endpoint.

I'm following the example FTPFunctionalTestCase from Mule In Action 2nd Ed chapter 03, which has both an ftp:inbound-endpoint and an ftp:outbound-endpoint.

The point is that I'm not able to use FakeFtpServer for faking an SFTP server. Is there any trick I don't know for doing it, or should I use another class?

Andres
  • 10,561
  • 4
  • 45
  • 63

3 Answers3

3

FakeFtpServer does not provide SFTP, as it is a quite different technology from FTP. You might want to look at Mule endpoint mocking with Munit, or if you really need a mock SFTP server, you can look at this blog post on building one.

Anton Kupias
  • 3,945
  • 3
  • 16
  • 20
  • Thank you Anton. But isn't there any widely used library for faking SFTP (As FakeFtpServer for FTP)? – Andres Apr 22 '14 at 18:27
  • SFTP is short for SSH File Transfer Protocol, so what you are basically asking is "is there a widely used library for mocking SSH". The answer is yes, there are several such libraries, and in the above blog the author shares his experience in finding one that he could use to mock SFTP for his unit tests. – Anton Kupias Apr 22 '14 at 19:13
2

Munit also provides an FTP/SFTP server for your integration tests

https://github.com/mulesoft/munit/wiki/ftp-server

Fefe
  • 91
  • 4
0

You need to go to the update site for munit and install SFTP integration tool in your Anypoint studio. Then you will be able to use SFTP integration testing tool.