From 79175b0f25ab166f70273a3c2c5c73715613bff1 Mon Sep 17 00:00:00 2001 From: Saw-jan Date: Tue, 9 Jul 2024 14:10:50 +0545 Subject: [PATCH] test: add TUS upload test for .. path --- tests/acceptance/features/bootstrap/WebDav.php | 2 +- .../features/coreApiWebdavUploadTUS/uploadFile.feature | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/features/bootstrap/WebDav.php b/tests/acceptance/features/bootstrap/WebDav.php index c4a5ad692a..565a780790 100644 --- a/tests/acceptance/features/bootstrap/WebDav.php +++ b/tests/acceptance/features/bootstrap/WebDav.php @@ -1576,7 +1576,7 @@ trait WebDav { $type ); $statusCode = $response->getStatusCode(); - if ($statusCode < 401 || $statusCode > 404) { + if ($statusCode < 400 || $statusCode > 499) { try { $responseXml = HttpRequestHelper::getResponseXml( $response, diff --git a/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature b/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature index ddececd3fb..ee868e4ac9 100644 --- a/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature +++ b/tests/acceptance/features/coreApiWebdavUploadTUS/uploadFile.feature @@ -164,14 +164,17 @@ Feature: upload file | old | "filewithLF-and-CR\r\n" | ZmlsZXdpdGhMRi1hbmQtQ1INCgo= | | old | "folder/file" | Zm9sZGVyL2ZpbGU= | | old | "my\\file" | bXkMaWxl | + | old | ".." | Li4= | | new | " " | IA== | | new | "filewithLF-and-CR\r\n" | ZmlsZXdpdGhMRi1hbmQtQ1INCgo= | | new | "folder/file" | Zm9sZGVyL2ZpbGU= | | new | "my\\file" | bXkMaWxl | + | new | ".." | Li4= | | spaces | " " | IA== | | spaces | "filewithLF-and-CR\r\n" | ZmlsZXdpdGhMRi1hbmQtQ1INCgo= | | spaces | "folder/file" | Zm9sZGVyL2ZpbGU= | | spaces | "my\\file" | bXkMaWxl | + | spaces | ".." | Li4= | Scenario Outline: upload a zero-byte file