From b5cc641442fd53ac575ae68df3bc2cb4397aa46a Mon Sep 17 00:00:00 2001 From: Adrian Dvergsdal Date: Fri, 16 Nov 2018 16:04:28 +0100 Subject: [PATCH] Test dir with spaces --- tests/run | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/run b/tests/run index 79cd3a5..6f92d84 100755 --- a/tests/run +++ b/tests/run @@ -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() {