mirror of
https://github.com/atmoz/sftp.git
synced 2024-11-17 12:51:33 -05:00
Test usernames with dots
This commit is contained in:
parent
c4fd217a7e
commit
2891aab052
1 changed files with 9 additions and 0 deletions
|
@ -44,9 +44,11 @@ function beforeTest() {
|
|||
mkdir "$tmpDir"
|
||||
|
||||
echo "test::$(id -u):$(id -g):dir1,dir2" >> "$tmpDir/users"
|
||||
echo "user.with.dot::$(id -u):$(id -g)" >> "$tmpDir/users"
|
||||
$sudo docker run \
|
||||
-v "$tmpDir/users:/etc/sftp/users.conf:ro" \
|
||||
-v "$scriptDir/id_rsa.pub":/home/test/.ssh/keys/id_rsa.pub:ro \
|
||||
-v "$scriptDir/id_rsa.pub":/home/user.with.dot/.ssh/keys/id_rsa.pub:ro \
|
||||
-v "$tmpDir":/home/test/share \
|
||||
--name "$sftpContainerName" \
|
||||
--expose 22 \
|
||||
|
@ -132,6 +134,13 @@ function testLoginUsingSshKey() {
|
|||
assertReturn $? 0
|
||||
}
|
||||
|
||||
function testUserWithDotLogin() {
|
||||
$skipAllTests && skip && return 0
|
||||
|
||||
runSftpCommands "$sftpContainerName" "user.with.dot" "exit"
|
||||
assertReturn $? 0
|
||||
}
|
||||
|
||||
function testWritePermission() {
|
||||
$skipAllTests && skip && return 0
|
||||
|
||||
|
|
Loading…
Reference in a new issue