如何在Mule单元测试中伪造SFTP服务器? [英] How to fake SFTP server on Mule unit test?

查看:85
本文介绍了如何在Mule单元测试中伪造SFTP服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试对具有ftp:inbound-endpoint和sftp:outbound-endpoint的m子流进行单元测试.

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

我遵循的是《 Mule In Action》第二版第03章中的示例FTPFunctionalTestCase,它同时具有ftp:inbound-endpoint和ftp: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.

问题是我无法使用FakeFtpServer伪造SFTP服务器.这样做有什么我不知道的窍门吗?还是应该使用其他类?

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?

推荐答案

FakeFtpServer不提供SFTP,因为它与FTP完全不同.您可能需要查看使用Munit进行Mule端点模拟,或者如果您确实需要模拟的SFTP服务器,您可以查看

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.

这篇关于如何在Mule单元测试中伪造SFTP服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆