Skip to content

Commit 1526661

Browse files
authored
Upgrade to MINA SSHD 2.10.0 (spring-projects#8676)
* Remove trailing slashes from remote dirs to create in SFTP tests
1 parent d4535ca commit 1526661

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ ext {
4747
modifiedFiles =
4848
files(grgit.status().unstaged.modified).filter { f -> f.name.endsWith('.java') || f.name.endsWith('.kt') }
4949

50-
apacheSshdVersion = '2.9.2'
50+
apacheSshdVersion = '2.10.0'
5151
artemisVersion = '2.29.0'
5252
aspectjVersion = '1.9.19'
5353
assertjVersion = '3.24.2'

spring-integration-sftp/src/test/java/org/springframework/integration/sftp/SftpTestSupport.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2022 the original author or authors.
2+
* Copyright 2016-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

spring-integration-sftp/src/test/java/org/springframework/integration/sftp/session/SftpRemoteFileTemplateTests.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ public void testINT3412AppendStatRmdir() {
7777
template.afterPropertiesSet();
7878

7979
template.execute(session -> {
80-
session.mkdir("/foo/");
81-
return session.mkdir("/foo/bar/");
80+
session.mkdir("/foo");
81+
return session.mkdir("/foo/bar");
8282
});
8383
template.append(new GenericMessage<>("foo"));
8484
template.append(new GenericMessage<>("bar"));
@@ -93,10 +93,10 @@ public void testINT3412AppendStatRmdir() {
9393
}
9494
});
9595
template.execute((SessionCallbackWithoutResult<SftpClient.DirEntry>) session -> {
96-
SftpClient.DirEntry[] files = session.list("/foo/");
96+
SftpClient.DirEntry[] files = session.list("/foo");
9797
assertThat(files.length).isEqualTo(4);
9898
assertThat(session.remove("/foo/foobar.txt")).isTrue();
99-
assertThat(session.rmdir("/foo/bar/")).isTrue();
99+
assertThat(session.rmdir("/foo/bar")).isTrue();
100100
files = session.list("/foo");
101101
assertThat(files.length).isEqualTo(2);
102102
List<String> fileNames = Arrays.stream(files).map(SftpClient.DirEntry::getFilename).toList();

0 commit comments

Comments
 (0)