Skip to content

Commit dc02488

Browse files
authored
Merge pull request #10763 from owncloud/image-config-test
[tests-only][full-ci] tests: adding test coverage for thumbnail service
2 parents 24798a8 + 6fd5630 commit dc02488

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

tests/acceptance/features/coreApiWebdavPreviews/previews.feature

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,3 +367,39 @@ Feature: previews of files downloaded through the webdav API
367367
| spaces | fill | fill.png |
368368
| spaces | resize | resize.png |
369369
| spaces | thumbnail | thumbnail.png |
370+
371+
@issue-10589 @env-config
372+
Scenario Outline: try to download an image preview when the maximum thumbnail input value in the environment is set to a small value
373+
Given the following configs have been set:
374+
| config | value |
375+
| THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE | 1KB |
376+
| THUMBNAILS_MAX_INPUT_WIDTH | 200 |
377+
| THUMBNAILS_MAX_INPUT_HEIGHT | 200 |
378+
And using <dav-path-version> DAV path
379+
And user "Alice" has uploaded file "filesForUpload/testavatar.jpg" to "/testimage.jpg"
380+
When user "Alice" downloads the preview of "/testimage.jpg" with width "36" and height "36" and processor thumbnail using the WebDAV API
381+
Then the HTTP status code should be "403"
382+
And the value of the item "/d:error/s:message" in the response should be "thumbnails: image is too large"
383+
Examples:
384+
| dav-path-version |
385+
| old |
386+
| new |
387+
| spaces |
388+
389+
@issue-10589 @env-config
390+
Scenario Outline: try to download a file preview when the maximum thumbnail input value in the environment is set to a small value
391+
Given the following configs have been set:
392+
| config | value |
393+
| THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE | 1KB |
394+
| THUMBNAILS_MAX_INPUT_WIDTH | 200 |
395+
| THUMBNAILS_MAX_INPUT_HEIGHT | 200 |
396+
And using <dav-path-version> DAV path
397+
And user "Alice" has uploaded file "filesForUpload/lorem-big.txt" to "/lorem-big.txt"
398+
When user "Alice" downloads the preview of "/lorem-big.txt" with width "36" and height "36" and processor thumbnail using the WebDAV API
399+
Then the HTTP status code should be "403"
400+
And the value of the item "/d:error/s:message" in the response should be "thumbnails: image is too large"
401+
Examples:
402+
| dav-path-version |
403+
| old |
404+
| new |
405+
| spaces |

0 commit comments

Comments
 (0)