lgoldstein commented on a change in pull request #88: Fix download with pattern 
issue in rooted filesystem
URL: https://github.com/apache/mina-sshd/pull/88#discussion_r255436046
 
 

 ##########
 File path: sshd-scp/src/test/java/org/apache/sshd/client/scp/ScpTest.java
 ##########
 @@ -589,6 +589,53 @@ public void testScpNativeOnDirWithPattern() throws 
Exception {
         }
     }
 
+    @Test
+    public void testScpVirtualOnDirWithPattern() throws Exception {
+        Path remoteDir = Files.createTempDirectory("remote");
+        sshd.setFileSystemFactory(new VirtualFileSystemFactory(remoteDir));
 
 Review comment:
   Please note that `sshd` is a **shared** instance - therefore you need to 
restore it to its original state:
   ```java
   @Test
   public void testScpVirtualOnDirWithPattern() throws Exception {
       try {
         ...
          sshd.setFileSystemFactory(...test factory...);
         ...
       } finally {
           sshd.setFileSystemFactory(fileSystemFactory);    // the one created 
in the test constructor
       }
   }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to