mirror of
https://github.com/atmoz/sftp.git
synced 2024-11-24 12:59:24 -05:00
Test dir with spaces
This commit is contained in:
parent
8dcc6914b1
commit
b5cc641442
1 changed files with 8 additions and 5 deletions
13
tests/run
13
tests/run
|
@ -253,22 +253,25 @@ function testCreateUsersUsingCombo() {
|
||||||
function testWriteAccessToAutocreatedDirs() {
|
function testWriteAccessToAutocreatedDirs() {
|
||||||
docker run --name "$containerName" -d \
|
docker run --name "$containerName" -d \
|
||||||
-v "/tmp/atmoz_sftp_test_rsa.pub":/home/test/.ssh/keys/id_rsa.pub:ro \
|
-v "/tmp/atmoz_sftp_test_rsa.pub":/home/test/.ssh/keys/id_rsa.pub:ro \
|
||||||
"$imageName" test::::dir1,dir2 \
|
"$imageName" "test::::testdir,dir with spaces" \
|
||||||
> "$redirect" 2>&1
|
> "$redirect" 2>&1
|
||||||
|
|
||||||
waitForServer "$containerName"
|
waitForServer "$containerName"
|
||||||
assertTrue "waitForServer" $?
|
assertTrue "waitForServer" $?
|
||||||
|
|
||||||
runSftpCommands "$containerName" "test" \
|
runSftpCommands "$containerName" "test" \
|
||||||
"cd dir1" \
|
"cd testdir" \
|
||||||
"mkdir test" \
|
"mkdir test" \
|
||||||
"cd ../dir2" \
|
"cd '../dir with spaces'" \
|
||||||
"mkdir test" \
|
"mkdir test" \
|
||||||
"exit"
|
"exit"
|
||||||
assertTrue "runSftpCommands" $?
|
assertTrue "runSftpCommands" $?
|
||||||
|
|
||||||
docker exec "$containerName" test -d /home/test/dir1/test -a -d /home/test/dir2/test
|
docker exec "$containerName" test -d /home/test/testdir/test
|
||||||
assertTrue "dirs exists" $?
|
assertTrue "testdir write access" $?
|
||||||
|
|
||||||
|
docker exec "$containerName" test -d "/home/test/dir with spaces/test"
|
||||||
|
assertTrue "dir with spaces write access" $?
|
||||||
}
|
}
|
||||||
|
|
||||||
function testBindmountDirScript() {
|
function testBindmountDirScript() {
|
||||||
|
|
Loading…
Reference in a new issue