0
0
Fork 0
mirror of https://github.com/atmoz/sftp.git synced 2024-12-22 13:14:42 -05:00

Test usernames with dots

This commit is contained in:
Adrian Dvergsdal 2017-06-25 15:16:41 +02:00
parent c4fd217a7e
commit 2891aab052

View file

@ -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