Skip to content

Commit

Permalink
This reproduces the problem described in #1952.
Browse files Browse the repository at this point in the history
  • Loading branch information
dadoonet committed Nov 4, 2024
1 parent 85b27fb commit f08042d
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,23 @@ public void test_ssh_with_key() throws Exception {

countTestHelper(new ESSearchRequest().withIndex(getCrawlerName()), 1L, null);
}

/**
* Test for <a href="https://github.com/dadoonet/fscrawler/issues/1952">#1952</a>
* @throws Exception in case of error
*/
@Test
public void test_ssh_with_space_in_filename() throws Exception {
Fs fs = startCrawlerDefinition("/").build();
Server server = Server.builder()
.setHostname(sshd.getHost())
.setPort(sshd.getPort())
.setUsername(SSH_USERNAME)
.setPassword(SSH_PASSWORD)
.setProtocol(Server.PROTOCOL.SSH)
.build();
crawler = startCrawler(getCrawlerName(), fs, endCrawlerDefinition(getCrawlerName()), server);

countTestHelper(new ESSearchRequest().withIndex(getCrawlerName()), 3L, null);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This filename has spaces.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file contains some words.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This filename ends with a space.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file contains some words.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file contains some words.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file contains some words.

0 comments on commit f08042d

Please sign in to comment.