Upgrade to MINA SSHD 2.10.0 (#8676)
* Remove trailing slashes from remote dirs to create in SFTP tests
This commit is contained in:
@@ -47,7 +47,7 @@ ext {
|
||||
modifiedFiles =
|
||||
files(grgit.status().unstaged.modified).filter { f -> f.name.endsWith('.java') || f.name.endsWith('.kt') }
|
||||
|
||||
apacheSshdVersion = '2.9.2'
|
||||
apacheSshdVersion = '2.10.0'
|
||||
artemisVersion = '2.29.0'
|
||||
aspectjVersion = '1.9.19'
|
||||
assertjVersion = '3.24.2'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016-2022 the original author or authors.
|
||||
* Copyright 2016-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -77,8 +77,8 @@ public class SftpRemoteFileTemplateTests extends SftpTestSupport {
|
||||
template.afterPropertiesSet();
|
||||
|
||||
template.execute(session -> {
|
||||
session.mkdir("/foo/");
|
||||
return session.mkdir("/foo/bar/");
|
||||
session.mkdir("/foo");
|
||||
return session.mkdir("/foo/bar");
|
||||
});
|
||||
template.append(new GenericMessage<>("foo"));
|
||||
template.append(new GenericMessage<>("bar"));
|
||||
@@ -93,10 +93,10 @@ public class SftpRemoteFileTemplateTests extends SftpTestSupport {
|
||||
}
|
||||
});
|
||||
template.execute((SessionCallbackWithoutResult<SftpClient.DirEntry>) session -> {
|
||||
SftpClient.DirEntry[] files = session.list("/foo/");
|
||||
SftpClient.DirEntry[] files = session.list("/foo");
|
||||
assertThat(files.length).isEqualTo(4);
|
||||
assertThat(session.remove("/foo/foobar.txt")).isTrue();
|
||||
assertThat(session.rmdir("/foo/bar/")).isTrue();
|
||||
assertThat(session.rmdir("/foo/bar")).isTrue();
|
||||
files = session.list("/foo");
|
||||
assertThat(files.length).isEqualTo(2);
|
||||
List<String> fileNames = Arrays.stream(files).map(SftpClient.DirEntry::getFilename).toList();
|
||||
|
||||
Reference in New Issue
Block a user