test: run Core-API-8 test suite on k8s
@@ -4039,8 +4039,19 @@ trait WebDav {
|
||||
$responseBodyContent = $response->getBody()->getContents();
|
||||
$size = \getimagesizefromstring($responseBodyContent);
|
||||
Assert::assertNotFalse($size, "could not get size of image");
|
||||
Assert::assertEquals($width, $size[0], "width not as expected");
|
||||
Assert::assertEquals($height, $size[1], "height not as expected");
|
||||
// allow multiple acceptable expected dimensions, comma-separated
|
||||
$checkDimension = static function (string $expected, int $actual, string $message): void {
|
||||
$expectedParts = array_map('trim', explode(',', $expected));
|
||||
$expectedInts = array_map('intval', $expectedParts);
|
||||
if (\count($expectedInts) > 1) {
|
||||
Assert::assertContainsEquals($actual, $expectedInts, $message);
|
||||
} else {
|
||||
Assert::assertEquals($expectedInts[0], $actual, $message);
|
||||
}
|
||||
};
|
||||
|
||||
$checkDimension($width, $size[0], "width not as expected");
|
||||
$checkDimension($height, $size[1], "height not as expected");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -389,10 +389,10 @@ Feature: previews of files downloaded through the webdav API
|
||||
@issue-10589 @env-config
|
||||
Scenario Outline: try to download a file preview when the maximum thumbnail input value in the environment is set to a small value
|
||||
Given the following configs have been set:
|
||||
| config | value |
|
||||
| THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE | 1KB |
|
||||
| THUMBNAILS_MAX_INPUT_WIDTH | 200 |
|
||||
| THUMBNAILS_MAX_INPUT_HEIGHT | 200 |
|
||||
| service | config | value |
|
||||
| thumbnails | THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE | 1KB |
|
||||
| thumbnails | THUMBNAILS_MAX_INPUT_WIDTH | 200 |
|
||||
| thumbnails | THUMBNAILS_MAX_INPUT_HEIGHT | 200 |
|
||||
And using <dav-path-version> DAV path
|
||||
And user "Alice" has uploaded file "filesForUpload/lorem-big.txt" to "/lorem-big.txt"
|
||||
When user "Alice" downloads the preview of "/lorem-big.txt" with width "32" and height "32" and processor thumbnail using the WebDAV API
|
||||
@@ -407,10 +407,10 @@ Feature: previews of files downloaded through the webdav API
|
||||
@issue-10589 @env-config
|
||||
Scenario Outline: download a file preview when the maximum thumbnail input value in the environment is set to a valid value
|
||||
Given the following configs have been set:
|
||||
| config | value |
|
||||
| THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE | 1KB |
|
||||
| THUMBNAILS_MAX_INPUT_WIDTH | 700 |
|
||||
| THUMBNAILS_MAX_INPUT_HEIGHT | 700 |
|
||||
| service | config | value |
|
||||
| thumbnails | THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE | 1KB |
|
||||
| thumbnails | THUMBNAILS_MAX_INPUT_WIDTH | 700 |
|
||||
| thumbnails | THUMBNAILS_MAX_INPUT_HEIGHT | 700 |
|
||||
And using <dav-path-version> DAV path
|
||||
And user "Alice" has uploaded file with content "hello world" to "test.txt"
|
||||
When user "Alice" downloads the preview of "/test.txt" with width "32" and height "32" and processor thumbnail using the WebDAV API
|
||||
@@ -424,10 +424,10 @@ Feature: previews of files downloaded through the webdav API
|
||||
@issue-10589 @env-config
|
||||
Scenario Outline: download an image preview when the maximum thumbnail input value in the environment is set to a valid value
|
||||
Given the following configs have been set:
|
||||
| config | value |
|
||||
| THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE | 36KB |
|
||||
| THUMBNAILS_MAX_INPUT_WIDTH | 1250 |
|
||||
| THUMBNAILS_MAX_INPUT_HEIGHT | 650 |
|
||||
| service | config | value |
|
||||
| thumbnails | THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE | 36KB |
|
||||
| thumbnails | THUMBNAILS_MAX_INPUT_WIDTH | 1250 |
|
||||
| thumbnails | THUMBNAILS_MAX_INPUT_HEIGHT | 650 |
|
||||
And using <dav-path-version> DAV path
|
||||
And user "Alice" has uploaded file "filesForUpload/testavatar.png" to "/testimage.png"
|
||||
When user "Alice" downloads the preview of "/testimage.png" with width "32" and height "32" and processor thumbnail using the WebDAV API
|
||||
|
||||
@@ -21,16 +21,16 @@ Feature: sizing of previews of files downloaded through the webdav API
|
||||
| request-width | request-height | return-width | return-height | dav-path-version |
|
||||
| 1 | 1 | 16 | 16 | old |
|
||||
| 32 | 32 | 32 | 32 | old |
|
||||
| 1024 | 1024 | 640 | 480 | old |
|
||||
| 1024 | 1024 | 640 | 480,640 | old |
|
||||
| 1 | 1024 | 16 | 16 | old |
|
||||
| 1024 | 1 | 640 | 480 | old |
|
||||
| 1024 | 1 | 640 | 480,640 | old |
|
||||
| 1 | 1 | 16 | 16 | new |
|
||||
| 32 | 32 | 32 | 32 | new |
|
||||
| 1024 | 1024 | 640 | 480 | new |
|
||||
| 1024 | 1024 | 640 | 480,640 | new |
|
||||
| 1 | 1024 | 16 | 16 | new |
|
||||
| 1024 | 1 | 640 | 480 | new |
|
||||
| 1024 | 1 | 640 | 480,640 | new |
|
||||
| 1 | 1 | 16 | 16 | spaces |
|
||||
| 32 | 32 | 32 | 32 | spaces |
|
||||
| 1024 | 1024 | 640 | 480 | spaces |
|
||||
| 1024 | 1024 | 640 | 480,640 | spaces |
|
||||
| 1 | 1024 | 16 | 16 | spaces |
|
||||
| 1024 | 1 | 640 | 480 | spaces |
|
||||
| 1024 | 1 | 640 | 480,640 | spaces |
|
||||
|
||||
@@ -18,9 +18,9 @@ Feature: tests of the creation extension see https://tus.io/protocols/resumable-
|
||||
| Tus-Extension | creation-with-upload |
|
||||
Then the HTTP status code should be "201"
|
||||
And the following headers should match these regular expressions
|
||||
| Tus-Resumable | /1\.0\.0/ |
|
||||
| Location | /http[s]?:\/\/.*:\d+\/data\/.*/ |
|
||||
| Upload-Offset | /\d+/ |
|
||||
| Tus-Resumable | /1\.0\.0/ |
|
||||
| Location | /http[s]?:\/\/.*(?::\d+)?\/data\/.*/ |
|
||||
| Upload-Offset | /\d+/ |
|
||||
And the content of file "/test.txt" for user "Alice" should be "uploaded content"
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
|
||||
@@ -16,8 +16,8 @@ Feature: low level tests of the creation extension see https://tus.io/protocols/
|
||||
| Tus-Resumable | 1.0.0 |
|
||||
Then the HTTP status code should be "201"
|
||||
And the following headers should match these regular expressions
|
||||
| Tus-Resumable | /1\.0\.0/ |
|
||||
| Location | /http[s]?:\/\/.*:\d+\/data\/.*/ |
|
||||
| Tus-Resumable | /1\.0\.0/ |
|
||||
| Location | /http[s]?:\/\/.*(?::\d+)?\/data\/.*/ |
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
|
||||
@@ -51,7 +51,7 @@ Feature: low level tests for upload of chunks
|
||||
When user "Alice" sends a chunk to the last created TUS Location with offset "0" and data "123" using the WebDAV API
|
||||
And user "Alice" sends a chunk to the last created TUS Location with offset "3" and data "4567890" using the WebDAV API
|
||||
And user "Alice" sends a chunk to the last created TUS Location with offset "3" and data "0000000" using the WebDAV API
|
||||
Then the HTTP status code should be "404"
|
||||
Then the HTTP status code should be "404" or "409"
|
||||
And the content of file "/file.txt" for user "Alice" should be "1234567890"
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
|
||||
|
Before Width: | Height: | Size: 874 B After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 713 B After Width: | Height: | Size: 885 B |
|
Before Width: | Height: | Size: 829 B After Width: | Height: | Size: 984 B |
|
Before Width: | Height: | Size: 874 B After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 620 B After Width: | Height: | Size: 739 B |