Skip to content

Commit

Permalink
Test dir with spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
atmoz committed Nov 16, 2018
1 parent 8dcc691 commit b5cc641
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions tests/run
Original file line number Diff line number Diff line change
Expand Up @@ -253,22 +253,25 @@ function testCreateUsersUsingCombo() {
function testWriteAccessToAutocreatedDirs() {
docker run --name "$containerName" -d \
-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

waitForServer "$containerName"
assertTrue "waitForServer" $?

runSftpCommands "$containerName" "test" \
"cd dir1" \
"cd testdir" \
"mkdir test" \
"cd ../dir2" \
"cd '../dir with spaces'" \
"mkdir test" \
"exit"
assertTrue "runSftpCommands" $?

docker exec "$containerName" test -d /home/test/dir1/test -a -d /home/test/dir2/test
assertTrue "dirs exists" $?
docker exec "$containerName" test -d /home/test/testdir/test
assertTrue "testdir write access" $?

docker exec "$containerName" test -d "/home/test/dir with spaces/test"
assertTrue "dir with spaces write access" $?
}

function testBindmountDirScript() {
Expand Down

0 comments on commit b5cc641

Please sign in to comment.