Reputation: 99
I am writing Munit test cases for an application which has FTP/SFTP outbound endpoints.
To mock these outbound endpoints and to run my test cases standalone, I am using Munit FTP server. But I am unable to give 'path' attribute value other than '/tmp' in FTP/SFTP outbound compnent. If I try to give other value for 'path' attribute, I am getting below error.
Error '/SFTPDEV' occurred when trying to CDW to '//SFTPDEV'. (java.io.IOException)
In other applications it not accepting '/tmp' also. I am getting below error.
Error '/tmp' occurred when trying to CDW to '//tmp'. (java.io.IOException)
Can anyone please tell me what is the main reason for this error. Why it is unable to change the working directory and what would be the solution.
Upvotes: 1
Views: 518
Reputation: 712
this is not a MUnit issue.
Your see the MUnit ftp server is based on the Apache FTP, and by default is assumes the root of the server is the root of the host. In unix based systems that would be "/".
Most unix based systems should come with a /tmp folder thus the example in the wiki. So you should be able to write in any folder you choose to.
That said the problem is, it seems in the FTP outbound endpoint that can not create a folder if the same doesn't exists: https://www.mulesoft.org/jira/browse/MULE-5192
Not really sure about the double "/" in your post and I couldn't reproduce that error.
HTH
Upvotes: 0